Part Number Hot Search : 
106K0 CEM4207 SDA276BF F2021 100CA P8261 MUR820 TSZ2J48S
Product Description
Full Text Search
 

To Download UPD77533S1-YHC Datasheet File

  If you can't view the Datasheet, Please click here to try to view without PDF Reader .  
 
 


  Datasheet File OCR Text:
  data sheet mos integrated circuit pd77533 gps signal processor lsi document no. s15671ej4v0ds00 (4th edition) date published july 2002 n cp(k) printed in japan preliminary product information data sheet the mark shows ma j or revised p oints. description the pd77533 is a gps (global positioning system) signal processor lsi for gps receivers that realizes the wireless assisted gps of snaptrack inc. the position of an sti-system gps receiver is determined by means of positioning functions on the wireless assisted gps receiver side such as pseudo range calculation and multi-path detection, via communication with a network location server. features ? wireless assisted gps positioning function ? pseudo range calculation ? multi-path detection ? precise, responsive, and fast positioning via communication with server ? on-chip sram (mobile specified ram), host serial, a/d control, and rf control interfaces ? power supply voltage ? internal system power supply: 1.425 to 1.65 v ? i/o pin power supply: 2.7 to 3.6 v ordering information part number package pd77533s1-yhc 108-pin plastic fine-pitch bga (11 11) the information in this document is subject to change without notice. before using this document, please confirm that this is the latest version. not all devices/types available in every country. please check with local nec representative for availability and additional information. ? 2001
data sheet s15671ej4v0ds 2 pd77533 pin configuration iv dd av dd ev dd adsck addi3 to addi0 agc dcoff rfon mcsb ma19 to ma0 md15 to md0 mrdb mwrb rxd rts cts txd resetb wkupb stndbyb txactv invrx gpsclk refclk gnd agnd 4 20 16 a/d i/f rf i/f memory i/f host serial i/f system i/f clock i/f +1.5 v +3.0 v +1.5 v
data sheet s15671ej4v0ds 3 pd77533 pin configuration (top view) pd77533s1-yhc ? 108-pin plastic fine-pitch bga (11 11) pin no. pin name pin no. pin name pin no. pin name pin no. pin name a1 nc c4 gnd g1 ma4 k10 adsck a2 gnd c5 mwrb g2 ma3 k11 ev dd a3 ma17 c6 i.c. g3 ev dd k12 addi3 a4 ma19 c7 mrdb g10 i.c. l1 nc a5 ev dd c8 stndbyb g11 ev dd l2 md13 a6 iv dd c9 wkupb g12 nc l3 md11 a7 invrx c10 gnd h1 ma2 l4 md9 a8 resetb c11 gnd h2 ma0 l5 md6 a9 gnd c12 refclk h3 ma1 l6 md3 a10 agnd d1 ma11 h10 rfon l7 md0 a11 nc d2 ma12 h11 agc l8 rxd a12 nc d3 ma10 h12 dcoff l9 cts b1 gnd d10 gnd j1 md15 l10 txactv b2 ma15 d11 gpsclk j2 ev dd l11 gnd b3 ma16 d12 i.c. j3 md12 l12 gnd b4 ma18 e1 ma8 j10 addi0 m1 nc b5 nc e2 ma9 j11 addi2 m2 gnd b6 gnd e3 ma7 j12 addi1 m3 md10 b7 mcsb e10 i.c. k1 gnd m4 md8 b8 nc e11 i.c. k2 md14 m5 md5 b9 iv dd e12 i.c. k3 gnd m6 gnd b10 av dd f1 ma6 k4 md7 m7 md1 b11 ev dd f2 gnd k5 ev dd m8 iv dd b12 nc f3 ma5 k6 md2 m9 rts c1 ma13 f10 gnd k7 md4 m10 txd c2 ev dd f11 i.c. -rl k8 gnd m11 nc c3 ma14 f12 i.c. k9 gnd m12 nc (bottom view) (top view) jhgfedcba 12 11 10 9 8 7 6 5 4 3 2 1 mlk abcdefghj index mark klm
data sheet s15671ej4v0ds 4 pd77533 pin identification addi3 to addi0: ad data bus adsck: ad converter clock output agc: auto gain control agnd: ground for pll analog system av dd : power supply for pll analog system cts: clear to send dcoff: dc off (dc trimming) ev dd : power supply for i/o pins gnd: ground gpsclk: gps clock i.c., i.c.-rl: internal connection invrx: rx invert iv dd : power supply for internal system ma19 to ma0: snapshot memory address bus mcsb: snapshot memory chip select md15 to md0: snapshot memory bus mrdb: snapshot memory read strobe mwrb: snapshot memory write strobe nc: non-connection refclk: reference clock resetb: reset rfon: rf power on rts: request to send rxd: host serial data input stndbyb: standby txactv: tx active txd: host serial data output wkupb: wakeup
data sheet s15671ej4v0ds 5 pd77533 contents 1. pin functions.............................................................................................................. .............................9 1.1 explanation of pin functions ................................................................................................ ........................ 9 1.2 handling of unused pins ..................................................................................................... ........................ 11 1.2.1 function pins ............................................................................................................. ....................... 11 1.2.2 non-function pins......................................................................................................... ..................... 11 1.2.3 pin i/o circuits .......................................................................................................... ........................ 12 2. overview of functions ...................................................................................................... ...........13 2.1 list of functions and commands .............................................................................................. ................. 13 2.2 host serial commands ........................................................................................................ ........................ 14 2.2.1 command format ............................................................................................................ .................. 14 2.2.2 asynchronous serial ....................................................................................................... .................. 14 3. reset...................................................................................................................... ...............................14 3.1 reset (hardware reset via resetb pin) ....................................................................................... ............ 14 3.1.1 status of pins at hardware reset.......................................................................................... ............. 15 3.1.2 internal parameter initialization......................................................................................... ................ 16 3.2 reset (software reset by reset command) ..................................................................................... ......... 17 3.3 processing required at startup .............................................................................................. .................... 17 4. communication error control ................................................................................................ 18 4.1 format error, undefined cmd-id error........................................................................................ ............... 18 4.1.1 when command from host cpu is server command........................................................................ 18 4.1.2 when command from host cpu is local command .......................................................................... 20 4.2 timeout error (command packet interruption) ................................................................................. ........ 20 4.2.1 character timeout setting ................................................................................................. ................ 21 4.2.2 character timeout operation ............................................................................................... .............. 21 4.3 timeout error (no response from pd77533)........................................................................................... 22 5. positioning control ........................................................................................................ ..............24 5.1 items that must be set before start of positioning .......................................................................... ........ 25 5.1.1 reference frequency ....................................................................................................... ................. 25 5.1.2 frequency adjustment function (fcc)....................................................................................... ....... 25 5.1.3 txactv control............................................................................................................ .................... 26 5.1.4 doppler search range ...................................................................................................... ................. 26 5.1.5 flow point output ......................................................................................................... ..................... 26 5.2 rf block on................................................................................................................. ................................. 27 5.2.1 agc and dcoff output signals .............................................................................................. ........ 27 5.3 gps signal reception (snapshot execution)................................................................................... ......... 27 5.4 rf block off ................................................................................................................ ................................ 28 5.5 pseudo range calculation .................................................................................................... ...................... 28 5.6 positioning result notification............................................................................................. ....................... 28 5.7 positioning end notification................................................................................................ ........................ 28 5.8 commands that cannot be sent during positioning ............................................................................. .. 28
data sheet s15671ej4v0ds 6 pd77533 6. system control ............................................................................................................. ..................29 6.1 fcc function ................................................................................................................ ................................29 6.1.1 frequency calibration control ............................................................................................. .............29 6.1.2 fcc reference frequency ................................................................................................... ............29 6.1.3 doppler search range ...................................................................................................... ...............29 6.2 baud rate setting ........................................................................................................... ..............................30 6.3 rf power supply control..................................................................................................... ........................31 6.4 txactv control .............................................................................................................. ..............................31 7. shifting to and restoring from power save mode..........................................................32 7.1 shifting to power save mode via power control command.....................................................................33 7.2 shifting to power save mode via sleep timer command ......................................................................... 33 7.2.1 sleep timer setting ....................................................................................................... .....................33 7.2.2 sleep timer operation..................................................................................................... ..................34 7.3 restoring from power save mode.............................................................................................. .................34 7.3.1 restoring via wkupb pin input ............................................................................................. ...........34 7.3.2 restoring from power save mode via command reception...............................................................35 8. debug function ............................................................................................................. ...................35 9. other functions ............................................................................................................ ..................36 9.1 receiver id notification.................................................................................................... ............................36 10. overview of command functions ...........................................................................................36 11. command types and responses............................................................................................... 37 11.1 commands ................................................................................................................... .................................37 11.2 responses.................................................................................................................. ...................................37 12. packet and command format................................................................................................. ..37 12.1 packet format .............................................................................................................. .................................38 12.1.1 cmd-id field ............................................................................................................. ........................38 12.1.2 length field............................................................................................................. .......................38 12.1.3 data field............................................................................................................... ..........................38 12.1.4 flag field ............................................................................................................... ..........................38 12.2 packet division ............................................................................................................ .................................39 12.3 extension command format ................................................................................................... ....................39 12.4 server command format ...................................................................................................... .......................40 12.4.1 header ................................................................................................................... ...........................40 12.4.2 command id............................................................................................................... ......................40 12.4.3 data field............................................................................................................... ............................40 12.4.4 checksum................................................................................................................. ........................41 12.4.5 end ...................................................................................................................... .............................41 12.5 packeting and de-packeting server commands ................................................................................. ......41
data sheet s15671ej4v0ds 7 pd77533 13. ack, nack, error status ................................................................................................... .........41 13.1 format of ack, nack, error status .......................................................................................... ................. 42 13.1.1 ack ...................................................................................................................... ............................ 42 13.1.2 nack, error status....................................................................................................... ..................... 42 13.2 flow of commands, reponses, ack, and nack .................................................................................. .... 43 13.2.1 ack, nack in case of local command....................................................................................... ...... 43 13.2.2 ack, nack in case of extension command................................................................................... .. 44 13.2.3 ack, nack in case of server command ...................................................................................... .... 45 14. hardware flow control....................................................................................................... 45 14.1 when hardware flow control is not performed................................................................................ ........ 45 14.1.1 local commands ........................................................................................................... ................... 46 14.1.2 extension commands ....................................................................................................... ................ 46 14.1.3 server commands.......................................................................................................... ................... 47 15. server commands ........................................................................................................... ..............48 15.1 handling of server commands by host cpu .................................................................................... ........ 48 15.1.1 server command analysis .................................................................................................. .............. 49 15.1.2 processing of baud rate change command (?set baud rate?) ......................................................... 50 15.2 set baud rate .............................................................................................................. ................................. 50 15.2.1 $bd...................................................................................................................... ............................. 50 15.2.2 !bd...................................................................................................................... ............................... 50 15.2.3 list of baud rates ....................................................................................................... ....................... 51 16. local commands............................................................................................................ ................51 16.1 baud rate change........................................................................................................... ............................. 52 16.2 fcc reference frequency.................................................................................................... ....................... 53 16.3 power control .............................................................................................................. ................................. 53 16.4 reset...................................................................................................................... ........................................ 54 16.5 rf power control ........................................................................................................... .............................. 55 16.6 frequency calibration control .............................................................................................. ...................... 56 16.7 txactv control ............................................................................................................. .............................. 56 16.8 sleep timer ................................................................................................................ ................................... 57 16.9 character timeout.......................................................................................................... .............................. 58 16.10 !cb request ............................................................................................................... .................................... 59 16.11 !ia request ............................................................................................................... ..................................... 60 16.12 snapshot memory check ..................................................................................................... ....................... 60 16.13 status request ............................................................................................................ ................................. 61 16.14 d77533 software version................................................................................................... .......................... 62 16.15 processing status request ................................................................................................. ........................ 63 16.16 rest processing ........................................................................................................... ................................ 63 16.17 error status.............................................................................................................. ..................................... 64 16.18 ca parameter set .......................................................................................................... ............................... 65 16.19 cb parameter set .......................................................................................................... ............................... 66 16.20 doppler search range ...................................................................................................... ........................... 67
data sheet s15671ej4v0ds 8 pd77533 17. extension commands ........................................................................................................ ...........68 17.1 flow point control ......................................................................................................... ...............................68 17.2 processing end............................................................................................................. ................................69 18. host cpu processing when positioning starts from receiver side.......................70 19. electrical specifications................................................................................................. ........71 20. application circuit example ............................................................................................... .....81 21. package drawing ........................................................................................................... ...............82 22. recommended soldering conditions....................................................................................83 appendix sample program....................................................................................................... ........84
data sheet s15671ej4v0ds 9 pd77533 1. pin functions 1.1 explanation of pin functions ? ? ? ? power supply pin name pin no. i/o function iv dd a6, b9, m8 ? power supply for core (1.425 to 1.65 v) ev dd a5, b11, c2, g3, g11, j2 ,k5, k11 ? power supply for i/o pins (2.7 to 3.6 v) gnd a2, a9, b1, b6, c4, c10, c11, d10, f2, f10, k1, k3, k8, k9, l11, l12, m2, m6 ? ground av dd b10 ? power supply for pll analog (1.425 to 1.65 v) agnd a10 ? ground for pll analog ? clock control pin name pin no. i/o function gpsclk d11 input gps reference clock input (16.384 mhz) inputs the clock for operating the pd77533. refclk c12 input frequency adjustment reference clock (pdc: 14.4 mhz, phs: 19.2 mhz, etc.) ? system control pin name pin no. i/o function resetb a8 input internal system reset i nput initializes the pd77533. wkupb c9 input stop mode release input wakeup interrupt input: falling edge detection stndbyb c8 output standby status (stop or halt) 0: standby status 1: operating txactv l10 input addi data mask enable signal 0: not masked 1: masked invrx a7 input rxd logic inversion setting signal this signal sets inversion of the host serial input rxd logic. 0: not inverted 1: inverted ? host serial interface pin name pin no. i/o function rxd l8 input asynchronous serial input rts m9 output request to send cts l9 input clear to send txd m10 output asynchronous serial output
data sheet s15671ej4v0ds 10 pd77533 ? rf control interface pin name pin no. i/o function agc h11 output (3s) auto gain control see table 5-1 output values of agc and dcoff . dcoff h12 output (3s) dc offset control see table 5-1 output values of agc and dcoff . rfon h10 output rf power control 0: rf off 1: rf on ? a/d converter control pin name pin no. i/o function adsck k10 output a/d conversion clock output addi3 to addi0 k12, j11, j12 , j10 input a/d conversion data input (4 bits) ? memory interface pin name pin no. i/o function mcsb b7 output snapshot memory chip select active-low signal. mrdb c7 output snapshot memory read strobe active-low signal. mwrb c5 output snapshot memory write strobe active-low signal. ma19 to ma0 a4, b4, a3, b3, b2, c3, c1, d2, d1, d3, e2, e1, e3, f1, f3, g1, g2, h1, h3, h2 output snapshot memory addresses (20 bits) md15 to md0 j1, k2, l2, j3, l3, m3, l4, m4, k4, l5, m5, k7, l6, k6, m7, l7 i/o (3s) snapshot memory data (16 bits) remark the md15 to md0 pins indicated by ?3s? in the i/o column become high impedance when the snapshot memory (external data memory) is not accessed. ? other pin name pin no. i/o function i.c. c6, d12, e10, e11, e12, f12, g10 ? internally connected pins leave these pins open. i.c.-rl f11 ? internally connected pin connect to gnd via a resistor. nc a1, a11, a12, b5, b8, b12, g12, l1, m1, m11, m12 ? non connect pins leave these pins open. caution if a signal is input to these pins, or if they are read, the operation of the pd77533 cannot be guaranteed.
data sheet s15671ej4v0ds 11 pd77533 1.2 handling of unused pins 1.2.1 function pins handle unused pins when the pd77533 is mounted according to the table below. pin i/o recommended connection adsck output leave open addi3 to addi0 input connect to gnd agc output leave open dcoff output leave open rfon output leave open mcsb output leave open ma19 to ma0 output leave open md15 to md0 i/o connect to ev dd via a pull-up resistor, or to gnd via a pull-down resistor mrdb output leave open mwrb output leave open rxd input connect to gnd rts output leave open cts input connect to gnd txd output leave open wkupb input connect to ev dd note stndbyb output leave open txactv input connect to gnd invrx input connect to gnd note only when stop mode is not used. 1.2.2 non-function pins pin i/o recommended connection i.c. ? leave open i.c.-rl ? connect to gnd via a resistor nc ? leave open
data sheet s15671ej4v0ds 12 pd77533 1.2.3 pin i/o circuits pin name i/o circuit type pin name i/o circuit type gpsclk c agc b refclk c dcoff b resetb c rfon b wkupb c adsck a stndbyb a addi3 to addi0 c txactv d mcsb a invrx c mrdb a rxd d mwrb a rts a ma19 to ma0 a cts d md15 to md0 b txd a type a type c p n out data v dd p n data v dd in type b type d in/out data output disable data input disable in data schmitt-triggered input with hysteresis characteristics
data sheet s15671ej4v0ds 13 pd77533 2. overview of functions 2.1 list of functions and commands the functions of the pd77533 can be controlled by external pins and commands. table 2-1. list of pd77533 functions and related pins/commands function related external pins (pin no.) related commands (cmd-id) reset resetb (a8) reset (0x04) !ia request (0x21) communication error control ? error status (0x3f) command timeout (0x13) positioning control adsck (k10) rfon (h10) agc (h11) dcoff (h12) flow point control (0x7f) !cb request (0x20) system control fcc gpsclk (d11) refclk (c12) frequency calibration control (0x06) fcc reference frequency (0x02) doppler search range (0x57) baud rate setting ? baud rate change (0x01) rf power supply control rfon (h10) rf power control (0x05) txactv control txactv (l10) txactv control (0x07) shift to/restore from power save mode wkupb (c9) stndbyb (c8) power control (0x03) sleep timer (0x12) debug function ? snapshot memory check (0x2d) status request (0x30) processing status request (0x33) rest processing (0x34) d77533 software version (0x31) other functions ? ca parameter set (0x40) cb parameter set (0x41)
data sheet s15671ej4v0ds 14 pd77533 2.2 host serial commands 2.2.1 command format the format of the serial commands used for communication between the pd77533 and the host cpu is shown below. for details of the command id (cmd-id), data structure, etc., see 12 packet and command format . figure 2-1. command format 2.2.2 asynchronous serial the asynchronous serial specifications are shown below. table 2-2. asynchronous serial specifications baud rate 2400, 4800, 9600 (initial value), 19200, 38400, 57600, 115200 bps supported start bit 1 bit stop bit 1 bit data length 8 bits parity none flow control rts (1: stop transmission, 0: request transmission) cts (1: stop transmission, 0: request transmission) 3. reset 3.1 reset (hardware reset via resetb pin) the hardware of the pd77533 is initialized by a reset via the resetb pin. caution a hardware reset must be applied at the resetb pin and a clock input to the gpsclk pin when the power is turned on. figure 3-1. hardware reset 8 bits cmd-id flag length data 8 bits 03h 0 to 255 bytes pd77533 host cpu internal parameter setting values initialized, external pins initialized reset (0x04) power applied, hardware reset released
data sheet s15671ej4v0ds 15 pd77533 3.1.1 status of pins at hardware reset the status of the pins when a hardware reset is applied (during resetb pin input) is shown in table 3-1 below. table 3-1. status of pins at hardware reset pin name pin no. i/o status stndbyb c8 output low-level output rts m9 output high-level output txd m10 output high-level output agc h11 output low-level output dcoff h12 output low-level output rfon h10 output low-level output adsck k10 output low-level output mcsb b7 output high-level output mrdb c7 output high-level output mwrb c5 output high-level output ma19 to ma0 a4, b4, a3, b3, b2, c3, c1, d2, d1, d3, e2, e1, e3, f1, f3, g1, g2, h1, h3, h2 output low-level output (all) md15 to md0 j1, k2, l2, j3, l3, m3, l4, m4, k4, l5, m5, k7, l6, k6, m7, l7 i/o high impedance
data sheet s15671ej4v0ds 16 pd77533 3.1.2 internal parameter initialization the internal parameters of the pd77533 and their initial values are shown in table 3-2 below. table 3-2. initial values of internal parameters parameter name related command cmd-id (ext-id) initial value meaning of initial value baud rate baud rate change 0x01 2 9600 bps reference frequency fcc reference frequency 0x02 0xe10000 14.4 mhz. the parameter value is set to the reference frequency multiplied by 1.024 (initial value: 14.4 mhz x 1.024 = 0xe10000). power save mode power control 0x03 0 no shift to power save mode; run mode is entered. power supply rf power control 0x05 0 power off fcc control frequency calibration control 0x06 0 no fcc control txactv control txactv control 0x07 0 no txactv control sleep mode sleep timer 0x12 0 halt mode is entered after sleep timer timeout sleep timer timer value (time until sleep) 0 sleep state is not entered timer value of character timeout (time until timeout) command timeout 0x13 0 timeout not detected. software version d77533 software version 0x31 1 ver.1.0 status (status of pd77533 signal processing) processing status request 0x33 ? idle number of processed satellites rest processing 0x34 0 0 total number of satellites that should be processed 00 current number of times positioning performed 00 total number of times positioning performed 00 error contents error status 0x3f ? no initial value doppler search range doppler search range 0x57 0x0168 search range = 360 hz flow points flow point control 0x7f (0x00) all 0 flow point output not controlled
data sheet s15671ej4v0ds 17 pd77533 3.2 reset (software reset by reset command) the internal parameters of the pd77533, except for the baud rate, are initialized by the reset command (0x04) from the host cpu. figure 3-2. software reset 3.3 processing required at startup when the gps receiver is activated, the host cpu must perform processing using the procedure shown below. figure 3-3. host cpu processing procedure at pd77533 startup pd77533 host cpu pd77533 startup ls reset response setting character timeout first is preferred. character timeout setting. other pd77533 settings made as required connect connection must be complete by this point. positioning possible confirm that the reset response is returned immediately after pd77533 startup. pd77533 host cpu set values of internal parameters except baud rate initialized reset (0x04) reset (0x04)
data sheet s15671ej4v0ds 18 pd77533 4. communication error control the following three types of communication errors (command errors hereafter) may occur in communication between the pd77533 and the host cpu. one of the following three error types is included in the data field of the error status command (cmd-id: 0x3f). table 4-1. types of command errors error type error definition format error the format of the command is incorrect. timeout error the specified time has elapsed while command packet reception is not complete, or the pd77533 does not respond to a command from the host cpu. undefined cmd-id error an undefined numeric value has been used as the cmd-id. 4.1 format error, undefined cmd-id error the control flow used when a format or undefined cmd-id error occurs is described below. for timeout error details, see 4.2 timeout error (command packet interruption) and 4.3 timeout error (no response from pd77533) . caution the control flow used when a format or undefined cmd-id error occurs during an uplink ( pd77533 ? ? ? ? host cpu) differs depending on whether the command from the host cpu is a server command or a local command. 4.1.1 when command from host cpu is server command when the command is a server command, packet transmission/reception is confirmed on a packet by packet basis using ack and nack. for details of the ack and nack formats, see 13 ack, nack error status . if an error occurs during an uplink (see figure 4-1 ), the host cpu sends nack to the pd77533, which then re- sends the same packet. the pd77533 can send the next packet after receiving ack from the host cpu. if an error occurs during a downlink (host cpu ? pd77533) (see figure 4-2 ), the pd77533 sends nack to the host cpu, which must then re-send the same packet. the host cpu can send the next packet after receiving ack from the pd77533.
data sheet s15671ej4v0ds 19 pd77533 figure 4-1. command error control flow for server commands (uplink error) figure 4-2. command error control flow for server commands (downlink error) pd77533 host cpu command error detected (server command) response sent previous response re-sent nack ("error status" (0x3f)) (server command) ack ack pd77533 host cpu command error detected (server command) previous command re-sent nack ("error status" (0x3f)) (server command) ack
data sheet s15671ej4v0ds 20 pd77533 4.1.2 when command from host cpu is local command when the command is a local command, packet transmission/reception is not confirmed using ack and nack. a response to the command (command execution result) is used as the ? ack ? from the pd77533 to the host cpu. there is no equivalent to ack for commands that receive no response (baud rate change command). if an error occurs during an uplink (see figure 4-3 ), even if the host cpu sends nack to the pd77533, the pd77533 will perform no processing. the host cpu must therefore re-send the same packet without returning nack. if an error occurs during a downlink (see figure 4-4 ), the pd77533 sends the host cpu the error status command (cmd-id: 0x3f). once the host cpu receives the error status command (cmd-id: 0x3f), the host cpu must re-send the same packet to the pd77533. figure 4-3. command error control flow for local commands (uplink error) figure 4-4. command error control flow for local commands (downlink error) 4.2 timeout error (command packet interruption) a timeout occurs in the pd77533 if the specified time elapses after the last data of a packet is received while packet reception is not complete. when a timeout occurs, the pd77533 returns a timeout ? error status ? (cmd-id: 0x3f), and all packet data received up to that point is discarded. pd77533 host cpu command error detected (local command) response sent previous response re-sent (local command) (local command) previous local command re-sent pd77533 host cpu (local command) previous command re-sent nack ("error status" (0x3f)) (local command) (local command) command error detected
data sheet s15671ej4v0ds 21 pd77533 4.2.1 character timeout setting the initial value of the character timeout timer value is 0 (timeout not detected) (see table 3-2 initial values of internal parameters ). it is therefore recommended to get the host cpu to set this timer to a value other than 0 immediately after the pd77533 (gps receiver) is activated (see figure 3-3 host cpu processing procedure at pd77533 startup ). the flow for setting the character timeout timer value is shown in figure 4-5 below. the timer value can be set to a time within a range of 0 to 16777215 ms. note that timeout processing is not performed if the timer value is set to 0. figure 4-5. character timeout timer setting pd77533 host cpu timer value setting character timeout (timer value) character timeout (timer value) 4.2.2 character timeout operation the timeout operation that occurs as a result of the character timeout settings in 4.2.1 is shown in figure 4-6 below. after discarding the command data received up to the interruption, the pd77533 sends the host cpu the error status command (cmd-id: 0x3f). figure 4-6. character timeout occurrence pd77533 host cpu command data interruption detected, timer operating, waiting for packet continuance command (up to data received before interruption) previous command re-sent command timer timeout received data discarded error status (timeout error)
data sheet s15671ej4v0ds 22 pd77533 4.3 timeout error (no response from pd77533) if there is no response from the pd77533 to a command from the host cpu, the host cpu must perform the following control processing. (1) if a character timeout has been set in the pd77533 a character timeout occurs in the pd77533 and the host cpu is sent the error status command (cmd-id: 0x3f) from the pd77533. after receiving the error status command (cmd-id: 0x3f), the host cpu resends the previous command (see figure 4-7 ). (2) if a character timeout has not been set in the pd77533 if there is no response from the pd77533 for 100 ms or more, the host cpu sends the pd77533 ? 3f ? in one byte units and waits to receive the error status command (cmd-id: 0x3f) from the pd77533. after receiving the error status command (cmd-id: 0x3f), the host cpu resends the previous command (see figure 4-8). it is recommended to preset a character timeout in the pd77533 because if not (case (2) above), it often takes a long time for the pd77533 to be restored. figure 4-7. processing flow when there is no response from pd77533 (character timeout set) pd77533 host cpu no response from pd77533, timer operating command previous command re-sent command timer timeout error status (timeout error)
data sheet s15671ej4v0ds 23 pd77533 figure 4-8. processing flow when there is no response from pd77533 (character timeout not set) note when the pd77533 is performing positioning, ? no response ? is judged to have occurred after 1 second (if there is no response from the pd77533 within 1 second, ? no response ? is judged to have occurred and ? 3f ? is sent). ? no response ? judgement following transmission of ? 3f ? is made after 100 ms. pd77533 host cpu previous command re-sent command error status (timeout error) no response from pd77533 (timer not set) no response from pd77533 (timer not set) no response from pd77533 (timer not set) no response from pd77533 for 100 ms note no response from pd77533 for 100 ms note no response from pd77533 for 100 ms note '3f' sent '3f' '3f' sent '3f' '3f' sent '3f' command sent command
data sheet s15671ej4v0ds 24 pd77533 5. positioning control an outline of the positioning flow is shown in figure 5-1 below. caution ack and nack have been omitted from the figure. the adc power can also be controlled by the rfon pin, but care must be taken with the control logic. figure 5-1. outline of positioning control pb1005k pd77533 adc tcxo mobile specified ram host cpu ls power off power off power off power off power off power on power on (clk off) power on initialization settings power on resetb settings commands preset for positioning . character timeout . fcc reference frequency . txactv control . frequency calibration control . flow point control (processing end) output setting power off power off power off power off positioning response (!jm) positioning directive ($jm) rfon = 1 agc, dcoff output starts (clk on) power on adc, dcoff start rfon = 0 agc, dcoff output stops (clk off) rf block on snapshot (gps signal reception) power off adc, dcoff stop rf block on pseudo range calculation calculation result (!hd) power off after receiving the positioning directive ($jm) from the ls (location server), the pd77533 may repeat the processing inside the dotted lines (the processing from when adsck output starts to when the calculation result (!hd) is sent) (for the number of repetitions specified by the ls). pin input command input remark power on adsck output starts adsck output stops positioning end notification (processing end)
data sheet s15671ej4v0ds 25 pd77533 the control flow when positioning starts from the receiver side differs depending on the system. an example of the control flow when positioning starts from the receiver side in a gps evaluation system is described below. when positioning starts from the receiver side, the host cpu sends the pd77533 the !cb request command (cmd-id: 0x20). upon receiving the !cb request command (cmd-id: 0x20), the pd77533 sends the !cb command to the ls (location server) following the procedure shown in 16.10 !cb request. after receiving ? !cb ? , the ls starts positioning. if positioning is requested by the ls, this command does not need to be used. after receiving the positioning command ? $jm ? from the ls (host cpu), the pd77533 automatically executes the following processing, as illustrated in figure 5-1. 1. rf block on 2. gps signal reception 3. rf block off 4. pseudo range calculation 5. calculation result notification 6. positioning end notification 5.1 items that must be set before start of positioning the items that must be set before positioning starts after the gps module is activated are described below. 5.1.1 reference frequency command: fcc reference frequency (cmd-id: 0x02) the initial value of the reference clock frequency is 14.4 mhz. to use a reference clock with a frequency of other than 14.4 mhz, change this setting using the fcc reference frequency command (cmd-id: 0x02). 5.1.2 frequency adjustment function (fcc) command: frequency calibration control (cmd-id: 0x06) for details of the frequency adjustment function (fcc: frequency calibration control), see 6.1.1 frequency calibration control . the initial value is ? no fcc ? . if the pd77533 local clock (gpsclk input clock signal, 16.384 mhz) is not accurate enough, in other words, to use the reference clock (refclk input signal) for frequency adjustment, change this setting to ? fcc control used ? using the frequency calibration control command (cmd-id: 0x06).
data sheet s15671ej4v0ds 26 pd77533 5.1.3 txactv control command: txactv control (cmd-id: 0x07) for details of txactv control, see 6.4 txactv control . the initial value is ? no txactv control ? . to avoid degradation of the gps reception signal due to pdc/phs rf output noise or noise from another such source, input a signal to the txactv input pin indicating that pdc/phs signals are being transmitted and change this setting to ? txactv control used ? using the txactv control command (cmd-id: 0x07). by doing this, the a/d converter output value when the txactv input signal = 1 (pdc/phs transmission in progress) is masked by 0x0 in the pd77533. 5.1.4 doppler search range command: ? doppler search range ? (cmd-id: 0x57) the doppler search range setting value differs depending on the frequency and accuracy of the reference clock and the local clock used. for details of how to calculate the doppler search range (calculation formula), see 6.1.3 doppler search range . 5.1.5 flow point output command: flow point control (cmd-id: 0x7f) the initial value of the flow point output is ? flow point output not controlled ? . the output of the processing end flow point must be set to on in order for the pd77533 to notify the host cpu that all positioning is complete. for flow point details, see 17.1 flow point control .
data sheet s15671ej4v0ds 27 pd77533 5.2 rf block on when positioning starts, the pd77533 automatically controls the external pins adsck, rfon, agc, and dcoff as follows, and switches on the rf block. specifically, the pd77533 performs the following. ? start of adsck signal output ? rfon = 1 (down converter power on) ? start of agc, dcoff signal output 5.2.1 agc and dcoff output signals the values of the agc and dcoff output signals are shown in table 5-1, together with the corresponding txactv input signal values and addi3 to addi0 input signal values (values input from a/d converter; 4 bits). dcoff is a feedback signal to the rf block and is used to adjust the rf offset. agc is a feedback signal to the rf block and is used to adjust the rf gain. when txactv is 1 (pdc/phs transmitting), both dcoff and agc are high-impedance output, regardless of the value input from adc. table 5-1. output values of agc and dcoff txactv (input signal) addi3 to addi0 (values input from a/d converter) dcoff (output signal) agc (output signal) 1 all cases high-impedance high-impedance 0 0b1111 1 0 0 0b1110 1 0 0 0b1101 1 0 0 0b1100 1 0 0 0b1011 1 0 0 0b1010 1 1 0 0b1001 1 1 0 0b1000 high-impedance 1 0 0b0111 0 1 0 0b0110 0 1 0 0b0101 0 0 0 0b0100 0 0 0 0b0011 0 0 0 0b0010 0 0 0 0b0001 0 0 0 0b0000 0 0 5.3 gps signal reception (snapshot execution) the pd77533 executes gps signal reception. details of this processing are not available to users. ? the snapshot execution time is set to the time specified by the host cpu or the server command ? $jm ? . ? the signal processing operation during snapshot execution (the ? status ? parameter) becomes ? snapshot in progress ? . ? the signal processing operation at the end of snapshot execution (the ? status ? parameter) becomes ? idling ? . remark see table 3-2 initial values of internal parameters for details of the status parameter.
data sheet s15671ej4v0ds 28 pd77533 5.4 rf block off the pd77533 switches off the rf block after receiving the gps signal. specifically, the pd77533 performs the following. ? adsck signal output stopped ? rfon = 0 (down converter power off) ? agc, dcoff signal output stopped 5.5 pseudo range calculation the pd77533 calculates the pseudo range using the received gps signal. 5.6 positioning result notification the pd77533 issues the server command ? !hd ? after calculating the pseudo range and notifies the ls of the result via the host cpu. 5.7 positioning end notification the pd77533 sends the processing end command (cmd-id: 0x7f) after all positioning has finished to inform the host cpu that all positioning is complete. note that it is necessary to set flow point output control to on using the flow point control command (cmd-id: 0x7f) before starting positioning. be aware that the initial value of the flow point control command (cmd-id: 0x7f) is ? flow point output not controlled ? . after receiving this response, the host cpu can perform processing such as switching off the power of the peripheral modules (such as the mobile specified ram). 5.8 commands that cannot be sent during positioning the commands that the host cpu is prohibited from sending while the pd77533 is performing positioning are shown in table 5-2. table 5-2. commands that cannot be sent during positioning command type cmd-id command local command 0x01 baud rate change 0x05 rf power control 0x06 frequency calibration control 0x07 txactv control
data sheet s15671ej4v0ds 29 pd77533 6. system control 6.1 fcc function the fcc (frequency calibration control) function is used to adjust the accuracy of the local clock (clock signal input to gpsclk input pin; 16.384 mhz) using the higher-accuracy reference clock (clock signal input to refclk input pin). with the pd77533, the reference clock used by the fcc function must be supplied during positioning (during snapshot) processing. the accuracy of the local clock adjusted by fcc is up to about 10 ppm. the following three commands are related to the fcc function. ? ? frequency calibration control ? (cmd-id:0x06) ? ? fcc reference frequency ? (cmd-id:0x02) ? ? doppler search range ? (cmd-id:0x57) 6.1.1 frequency calibration control the frequency calibration control command (cmd-id: 0x06) is used to set and check whether the fcc function is enabled or disabled. for how to set this command, see 16.6 frequency calibration control . 6.1.2 fcc reference frequency the fcc reference frequency command (cmd-id: 0x02) is used to set and check the reference frequency for the fcc function. the initial setting for the reference clock is 14.4 mhz. the value is set as 4-byte data that is the frequency multiplied by 1.024 (therefore the initial value is 0x00e10000 (14.4 1.024)). for details, see 16.2 fcc reference frequency . 6.1.3 doppler search range the doppler search range command (cmd-id: 0x57) is used to set the doppler search range (search range of receive signal frequency). the initial value is 360 hz (0x168). the value to be set as the doppler search range is determined by the local and reference clocks. the calculation method is shown below. the minimum value of the doppler search range parameter (hz) is calculated as follows. doppler search range = 2 | |difr| - |difi| | (hz)
data sheet s15671ej4v0ds 30 pd77533 when: difr = ? g 57542 . 1 024 . 1 2 024 . 1 2 1 024 . 1 384 . 16 2 ? ? ? ? ? ? ? + refclki refclki gpsclkr m refclkr difi = ? g 57542 . 1 024 . 1 2 024 . 1 2 024 . 1 384 . 16 2 ? ? ? ? ? ? ? refclki refclki gpsclkr m refclki refclki: logical value of refclk refclkr: actual value of refclk (including error) gpsclkr: actual value of gpsclk (including error) refclki: 14.4 mhz refclkr: 14.400002 mhz gpsclkr: 16.383900 mhz difr = ? g 57542 . 1 024 . 1 2 4 . 14 024 . 1 2 4 . 14 1 383900 . 16 024 . 1 384 . 16 2 400002 . 14 ? ? ? ? ? ? ? + m m m m m = ? 9882.7 difi = ? g 57542 . 1 024 . 1 2 4 . 14 024 . 1 2 4 . 14 383900 . 16 024 . 1 384 . 16 2 4 . 14 ? ? ? ? ? ? ? m m m m m = ? 9615.6 therefore: doppler search range = 2 ? ? ? 9882.7 ? ?? ? 9615.6 ? ? = 534.2 (hz) for details, see 16.20 doppler search range . 6.2 baud rate setting the baud rate change command (cmd-id: 0x01) is used to set the baud rate between the pd77533 and the host cpu. there are seven settable baud rates: 2400 bps, 4800 bps, 9600 bps (initial value), 19200 bps, 38400 bps, 57600 bps, and 115200 bps. if the pd77533 receives the baud rate change command (cmd-id: 0x01) while another command is being received, the baud rate will be set after reception of that command is complete.
data sheet s15671ej4v0ds 31 pd77533 6.3 rf power supply control the rf power control command (cmd-id: 0x05) is used to control the power supply of the rf block. during positioning (while the gps signal is being received), control from the host cpu via this command is not required because the pd77533 autonomously controls the rf block at this time. 6.4 txactv control the txactv control command (cmd-id: 0x07) is used to set mask control of the a/d conversion value via txactv pin input. figure 6-1. txactv control the pd77533 has a function to mask the a/d converter output value by 0h in cases such as when the gps receive signal is degraded due to noise at the pdc/phs rf output, or other such noise. the initial setting is ? a/d conversion value unmasked ? . when a signal indicating that pdc/phs signal transmission is in progress is input to the txactv pin and txactv control is set to ? a/d conversion value masked ? (txactv input signal = 1; pdc/phs transmitting), the signal received in the pd77533 is handled as 0b0000 regardless of the contents of the a/d converter output value (value input to the addi3 to addi0 pins) (in other words, the a/d conversion value is masked). at the same time, the output of the agc and dcoff pins becomes high-impedance. see 5.2.1 agc and dcoff output signals for the relationship between the txactv signal input and agc/dcoff pin output. pd77533 host cpu input to txactv pin enabled txactv control (control used) txactv control (control used)
data sheet s15671ej4v0ds 32 pd77533 7. shifting to and restoring from power save mode the pd77533 has two power save modes: stop and halt. the pd77533 is shifted from normal mode (run) to stop or halt mode via the power control command (cmd-id: 0x03) or sleep timer command (cmd-id: 0x12). the status is shifted back to the normal mode from the stop or halt mode when the wkupb pin input is 0, or, in the case of the halt mode, by the reception of any command. an outline of the status transition to and from the power save modes is shown in figure 7-1. the halt and stop modes differ as follows. [halt] ? the pll circuit in the pd77533 is not stopped, allowing fast transition back to normal mode. ? transition back to normal mode (run) occurs when the wkupb pin input is 0 or by the reception of any command. [stop] ? the pll circuit in the pd77533 is stopped, reducing the power consumption to 700 a (max.). ? transition back to normal mode (run) occurs when the wkupb pin input is 0. figure 7-1. shifting to and restoring from power save mode stop run halt power control (shift to halt) or sleep timer (shift to halt) power control (shift to stop) or sleep timer (shift to stop) wkupb pin input = 0 or any command received wkupb pin input = 0
data sheet s15671ej4v0ds 33 pd77533 7.1 shifting to power save mode via power control command the power control command (cmd-id: 0x03) (with stop or halt set in the data field) is used to shift the pd77533 to a power save mode (stop or halt). the flow of this transition is shown in figure 7-2. when the pd77533 receives the power control command (cmd-id: 0x03), it shifts to the specified power save mode after completing the following processing. ? turning off the power of the rf block (rfon output signal = 0) ? indicating externally that the status has been shifted to standby mode (stndbyb output signal = 0: standby mode) figure 7-2. flow of shifting to standby mode 7.2 shifting to power save mode via sleep timer command if the idle state (state in which signal processing is stopped and there is no serial command transmission/reception) continues for the timeout period set by the sleep timer command (cmd-id: 0x12), the pd77533 shifts to a power save mode (stop or halt). the mode to be shifted to is preset by the sleep timer command (cmd-id: 0x12). sleep timer setting/setting notification and sleep timer operation are described below. 7.2.1 sleep timer setting the sleep timer is set by the sleep timer command (cmd-id: 0x12). the mode to be shifted to (stop or halt) and the timer value at which the shift takes place are included in the data field of the sleep timer command. the sleep timer timeout value can be set within a range of 0 to 16777215 (0xffffff) ms. note, however, that if 0 ms is set, the pd77533 will not shift to a power save mode. pd77533 host cpu rfon = 0 (off) stndbyb = 0 (standby) "power control" stop or halt run
data sheet s15671ej4v0ds 34 pd77533 7.2.2 sleep timer operation the operation that is performed when a timeout occurs in the sleep timer set in 7.2.1 is shown in figure 7-3. figure 7-3. sleep timer timeout remark idle state: state in which signal processing is stopped and there is no serial command transmission/reception. 7.3 restoring from power save mode the pd77533 returns from a power save mode (stop or halt) to normal mode (run) when the wkupb pin input is 0 or (halt mode only) when any command is received. the wkupb pin is active low. 7.3.1 restoring via wkupb pin input the procedure for returning to normal mode from a power save mode via wkupb pin input is shown in figure 7-4. figure 7-4. restoring from power save mode (via wkupb pin input) pd77533 host cpu rfon = 0 (off) stndbyb = 0 (standby) stop or halt run idle state timeout sleep timer operating pd77533 host cpu stndbyb pin output = 1 (standby released) wkupb pin input = 0 stop or halt run "power control"
data sheet s15671ej4v0ds 35 pd77533 7.3.2 restoring from power save mode via command reception the procedure for returning to normal mode from halt mode via command reception is shown in figure 7-5. the pd77533 shifts from halt mode back to normal mode via wkupb pin input control or by serial command reception. figure 7-5. restoring from power save mode (halt) (via command reception) 8. debug function the debug function enables the following items to be checked via local commands. for further details, see the explanation of each command. table 8-1. debug function item command function snapshot memory check ? snapshot memory check ? (cmd-id:0x2d) writes values such as 0x0000 and 0xffff to the entire snapshot memory area and checks whether these values can be read correctly. serial communication operation check ? status request ? (cmd-id:0x30) checks the operation of the pd77533. the pd77533 simply sends a response to this command. signal processing status reference ? processing status request ? (cmd-id:0x33) references the signal processing status of the pd77533 (one of the following). ? executing snapshot ? processing signal ? idling during positioning control, the pd77533 shifts to the ? executing snapshot ? or ? processing signal ? mode. for the mode transition timing, see 5. positioning control . positioning progress reference ? rest processing ? (cmd-id:0x34) references the number of satellites remaining to be processed and the number of times positioning has been executed. pd77533 version reference ? d77533 software version ? (cmd-id:0x31) references the version of the pd77533 software (firmware). pd77533 host cpu stndbyb pin output = 1 (standby released) any command halt run "power control"
data sheet s15671ej4v0ds 36 pd77533 9. other functions 9.1 receiver id notification the following two commands are used to notify the ls (location server) of a receiver ? s id number. for details, see 16.18 ca parameter set , and 16.19 cb parameter set . ? ca parameter set (cmd-id: 0x40) this command sets or sends notification of the setting of the gps module ? s unit id and software version. ? cb parameter set (cmd-id: 0x41) this command sets or sends notification of the setting of the parameters when the positioning start command (!cb) is issued by the pd77533. 10. overview of command functions the configuration of a system using the pd77533 is shown below. this section will explain the command interface used between the pd77533 and the host cpu. figure 10-1. diagram of gps positioning system configuration table 10-1. function of each block block function rf radio frequency receives radio waves from a gps satellite and transfers them to the pd77533. pd77533 consists of a dsp core and logic circuits. processes the signals sent from the rf block and transfers them to the ls. host cpu controls the operations of the pd77533 and is the mediator in communication between the pd77533 and the ls. ls location server determines the position of the gps receiver based on the results of the signal processing performed by the pd77533. pd77533 host cpu ls rf communication via baseband gps receiver communication via uart
data sheet s15671ej4v0ds 37 pd77533 11. command types and responses the pd77533 executes the commands received from the host cpu or ls and returns a response. commands issued from the ls are called server commands and those issued by the host cpu are called local commands. the command acknowledgement issued from the pd77533 to the ls or host cpu is called a response. 11.1 commands the following three types of commands are used. table 11-1. command types type issued by function local command host cpu used for setting, controlling, and obtaining the current status of the pd77533. these commands are issued by the host cpu, which also receives the response from the pd77533. the ls is not involved in this operation. extension command host cpu provided to extend the local commands. these commands are issued by the host cpu, which also receives the response from the pd77533. the ls is not involved in this operation. server command ls used for positioning. these commands are issued by the ls, which also receives the response from the pd77533. the host cpu converts the data format (into/from packets) and operates as the mediator in the command/response communication between the pd77533 and the ls. some server commands must also be processed the host cpu. figure 11-1. relationship between commands and function blocks 11.2 responses there are two types of responses: those sent in response to a command, and those sent by the pd77533 spontaneously. for the former, there is not necessarily one response per command; there are commands for which multiple responses are returned, or for which no response is returned. for the latter, the response transmission timing is undefined, so the host cpu must always be in a state in which it can receive responses from the pd77533. 12. packet and command format data is transferred between the pd77533 and the host cpu in the form of packets. the data is 8-bit binary data (little endian), and does not necessarily consist only of ascii characters. pd77533 host cpu ls server command mediates server command communication, including performing packet/de-packet processing server command local command, extension command
data sheet s15671ej4v0ds 38 pd77533 12.1 packet format the packet format is shown below. the maximum packet length is 258 bytes. figure 12-1. packet format 12.1.1 cmd-id field the cmd-id field indicates the type of command: local, extension, or server. in the case of local commands, the cmd-id value indicates the actual command identifier. table 12-1. types of cmd-id cmd-id type 0x00 to 0x7e local command (cmd-id value indicates command identifier) 0x7f extension command 0x80 server command 12.1.2 length field the length field indicates the number of bytes in the data field. a value in the range of 0 to 255 is specified. the length does not include cmd-id, length, and flag. 12.1.3 data field the data field stores the data and status of the command specified by cmd-id. the length of the data field is indicated by the value in the length field. some commands do not include a data field. when the host cpu packets the server command, if the total length of the server command in an unpacketed state exceeds 255 bytes, the data is divided into multiple packets. if the size of one data item is 2 or more bytes, the data is stored in the order of lower byte(s) then higher byte(s) (little endian). 12.1.4 flag field the flag field contains a flag indicating the end of a packet. there are two types of flags. table 12-2. flag types flag meaning 0x03 single packet or the last of a number of divided packets. 0x02 first packet of a number of divided packets or one of the middle packets. 1 byte cmd-id flag length data 1 byte 1 byte variable length (0 to 255 bytes) number of bytes indicated by length
data sheet s15671ej4v0ds 39 pd77533 12.2 packet division the total length of the data in an unpacketed state in a server command or server command response sometimes exceeds 255 bytes. in this case, the host cpu cannot fit all the data in a single packet, and therefore divides the data into multiple packets. the data in local or extension commands cannot be divided and sent in multiple packets; the command must fit completely into a single packet. figure 12-2. example of single packet figure 12-3. example of data divided into multiple packets 12.3 extension command format extension commands (cmd-id = 0x7f) contain an additional ext-id field, which identifies the command. figure 12-4. extension command format flag data cmd-id original data flag = 0x03 flag data cmd-id original data flag = 0x03 flag data cmd-id flag data cmd-id flag = 0x02 1 byte cmd-id flag length data 1 byte 1 byte variable length number of bytes indicated by length 1 byte ext-id 0x7f
data sheet s15671ej4v0ds 40 pd77533 12.4 server command format server commands are stored in the data field of a packet in the format shown below. server commands are not in packet form when they are sent and received by the ls, so they must be ?packeted? by the host cpu. figure 12-5. server command format 12.4.1 header commands from and responses to the server have an ascii character as the header (indicating the start of the command or response). table 12-3. header type ascii character command $ (0x24) response ! (0x21) 12.4.2 command id the id that identifies the type of command or response has a 2-byte ascii character configuration (2 characters). table 12-4. command id type ascii character command combination of 2 uppercase characters, a to z response combination of 2 lowercase characters, a to z 12.4.3 data field the data field stores the data and status of the command or response. 1 byte cmd-id flag length data 1 byte 1 byte variable length number of bytes indicated by length 0x80 2 bytes header end of packet command id data field 1 byte 2 bytes variable length 2 bytes checksum $, ! 0x0d, 0x0a unpacketed server command
data sheet s15671ej4v0ds 41 pd77533 12.4.4 checksum the lower 16 bits of the sum of all the bytes from the 1-byte cmd-id to the byte preceding the checksum are used for the checksum. 12.4.5 end all commands and responses end with . = 0x0d, = 0x0a 12.5 packeting and de-packeting server commands when issued by the ls, server commands are not in the packet format required for interfacing between the pd77533 and host cpu, and must therefore be ? packeted ? by the host cpu. the host cpu must similarly ? de- packet ? packeted data from the pd77533 before sending it to the ls. figure 12-6. packeting and de-packeting server commands 13. ack, nack, error status in communication between the pd77533 and the host cpu, the transmission and reception of server and extension commands and responses is confirmed using ack and nack. table 13-1. ack and nack applications type description ack indicates that the command was received. nack (error status) indicates that the command cannot be received for some reason. pd77533 host cpu ls server command (packet form) packet/de-packet processing server command (unpacketed state) local command, extension command (packet form)
data sheet s15671ej4v0ds 42 pd77533 13.1 format of ack, nack, error status 13.1.1 ack there are two types of ack formats: ack format 1 for server commands and ack format 2 for extension commands. the pd77533 handles both these ack types as ? ack ? , regardless of which type is received. the host cpu can use either of these ack types, irrespective of the circumstances. the pd77533 returns ack to the host cpu in ack format 1 in response to server commands and ack format 2 in response to extension commands. table 13-2. ack format 1 (ack returned for server commands) field value number of bytes description cmd-id 0x80 1 length 0x00 1 flag 0x03 1 table 13-3. ack format 2 (ack returned for extension commands) field value number of bytes description cmd-id 0x3f 1 length 0x01 1 data 0x00 1 ack indicated by 0x00 flag 0x03 1 13.1.2 nack, error status table 13-4. nack, error status format field value number of bytes description cmd-id 0x3f 1 length 0x01 1 data errstat 1 0x00: ack (ok) 0x01: format error 0x02: timeout error undefined cmd-id error else: undefined flag 0x03 1
data sheet s15671ej4v0ds 43 pd77533 13.2 flow of commands, reponses, ack, and nack 13.2.1 ack, nack in case of local command when the command is a local command, ack and nack are not used to confirm packet transmission/reception. a response to the command (command execution result) is sent from the pd77533 to the host cpu instead of ack. there is no equivalent to ack for a command to which no response is returned (baud rate change command). even if nack is sent from the host cpu to the pd77533, the latter does not re-send the packet. figure 13-1. local command flow pd77533 host cpu command (cmd-id = 0x31) pd77533 version command transmitted error notification pd77533 version response example of normal flow response (cmd-id = 0x31) command (cmd-id = 0x31) timeout or error occurrence command (cmd-id = 0x31) response (cmd-id = 0x31) error (cmd-id = 0x3f) pd77533 version command transmitted pd77533 version response example of abnormal flow pd77533 version command transmitted
data sheet s15671ej4v0ds 44 pd77533 13.2.2 ack, nack in case of extension command some extension commands use ack and nack, and some do not. if nack is sent from the host cpu to the pd77533, the same packet is re-sent. the pd77533 can send the next packet after receiving ack from the host cpu. when a flow point is output from the pd77533 to the host cpu, the host cpu must send either ack or nack. the pd77533 stops outputting packets until this ack or nack is received. table 13-5. ack, nack for extension commands command type ext-id ack, nack control flow point setting command 0x00 not controlled flow point output other than 0x00 controlled (1) flow point setting command see figure 13-1 local command flow . (2) flow point output figure 13-2. flow point flow pd77533 host cpu flow point output packet re-sent example of normal flow ack (format 2) flow point output timeout or error occurrence flow point output ack (format 2) nack example of abnormal flow
data sheet s15671ej4v0ds 45 pd77533 13.2.3 ack, nack in case of server command when the command is a server command, ack and nack are used to confirm transmission and reception of each packet. if nack is sent from the host cpu to the pd77533, the same packet is re-sent. the pd77533 can send the next packet after receiving ack from the host cpu. when a response is output from the pd77533 to the host cpu, the host cpu must send either ack or nack. the pd77533 stops outputting packets until this ack or nack is received. figure 13-3. server command flow 14. hardware flow control in communication between the pd77533 and the host cpu, hardware flow control is carried out using cts-rts to prevent the loss of data due to a buffer overflow. 14.1 when hardware flow control is not performed when hardware flow control is not performed, data may be lost due to a buffer overflow. to prevent this, the host cpu must execute the following processing. pd77533 host cpu $ca command (cmd-id = 0x80) example of normal flow timeout or error occurrence nack example of abnormal flow ack (format 1) !ca response (cmd-id = 0x80) ack (format 1) $ca command transmitted ack for $ca !ca response transmitted ack for !ca $ca command (cmd-id = 0x80) $ca command transmitted $ca command (cmd-id = 0x80) ack (format 1) !ca response (cmd-id = 0x80) timeout or error occurrence nack for $ca $ca command resent ack for $ca !ca response transmitted nack !ca response (cmd-id = 0x80) ack (format 1) nack for !ca !ca response resent ack for !ca
data sheet s15671ej4v0ds 46 pd77533 14.1.1 local commands in the case of a local command, do not send the next command until a command response is returned. the host cpu only has a one-packet buffer, and therefore must receive responses from the pd77533 without delay. do not send local commands to which no response is returned while the pd77533 is performing signal processing. this is because a little time is required to execute a command received while the pd77533 is performing signal processing, making it impossible to know when command execution is complete. figure 14-1. local command flow (with no hardware flow control) 14.1.2 extension commands perform processing for the flow point setting command in the same way as for 14.1.1 local commands. for flow point output, because packet transmission/reception can be managed via ack and nack, there is no problem as long as the packet from the pd77533 is received without delay in the one-packet buffer provided on the host cpu side. figure 14-2. flow point output flow (with no hardware flow control) pd77533 host cpu command transmitted response returned the next command must not be sent between command transmission and response return the host cpu must receive the response without delay the next command can be sent now pd77533 host cpu flow point output returned ack returned the host cpu must receive the packet without delay nothing except ack or nack can be sent between flow point output return and ack return
data sheet s15671ej4v0ds 47 pd77533 14.1.3 server commands when sending server commands to the pd77533, do not send the next command until a command response is returned. multiple commands may be sent consecutively from the ls, but in this case, pool the commands from the ls on the host cpu side and make sure that only one command is sent to the pd77533 at a time. for command response, because packet transmission/reception can be managed via ack and nack, there is no problem as long as the packet from the pd77533 is received without delay in the one-packet buffer provided on the host cpu side. figure 14-3. server command flow (with no hardware flow control) pd77533 host cpu ls response the pd77533 sends the next packet after receiving ack. before this, a response is sent to the ls. command ack ack response command response 1 command 1 ack ack response 2 command 2 ack ack command 1 command 2 response 2 response 1 if command 2 is sent before a response to command 1 is returned, command 2 is held pending. the next command can be sent now.
data sheet s15671ej4v0ds 48 pd77533 15. server commands the pd77533 supports the following server commands. table 15-1. list of server commands command name command id function module id/version ca, ca obtains the unit id and software version information module processing status request bb, bb references the status of the lsi and positioning module reset ia, ia resets the gps module send processed result hd sends notification of the positioning result multi fix jm, jm specifies positioning ping for coarse time synchronization pj, pj course time s y nchronization. first command for positionin g session. set adaptive parameters ac, ac sets various parameters related to positioning set snapshot duration da, da command used to verif y the functions of the pd77533 note 1 (snapshot time setting) take snapshot ea, ea command used to verif y the functions of the pd77533 note 1 (snapshot execution) send snapshot data fa, fc, fa, fb, fc command used to verif y the functions of the pd77533 note 1 (snapshot data (1 ms frame) acquisition) set baud rate bd, bd sets connection speed between host cpu and ls note 2 request for service cb, cb sends notification of start of positioning at calling receiver notes 1. these commands are not required for normal positioning operations. 2. this command is processed by the host cpu; command processing by the pd77533 is not required. 15.1 handling of server commands by host cpu with a few exceptions, the host cpu simply acts as the mediator when server commands are communicated between the pd77533 and the ls. specifically, the host cpu performs the following processing. ? packets server commands sent from the ls and transfers them to the pd77533. ? de-packets responses sent from the pd77533 and transfers them to the ls. ? changes the baud rate upon recognition of the baud rate change server command and sends a response. ? performs ack and nack processing in communication between the pd77533 and the host cpu. in order to perform the above processing, the host cpu must analyze server commands and responses.
data sheet s15671ej4v0ds 49 pd77533 15.1.1 server command analysis the host cpu analyzes server commands sent by the ls as follows. (1) checks whether the command header is the ? $ ? character. (2) checks whether the command id is valid. starts the checksum calculation. (3) calculates the number of bytes in the data field according to ? determination of number of bytes in data field ? in table 15-2. (4) reads data of the number of bytes calculated in (3) and calculates the checksum. (5) checks whether the checksum matches the calculated value. (6) checks whether the end-of-packet is . if all of (1) to (6) are ok, the command is recognized as one command. if the command is other than the baud rate change command, the command is packeted and transferred to the pd77533. if an error occurs at any stage, 1 byte is discarded and the operation starts again from (1). table 15-2. determination of number of bytes in data field command id determination of number of bytes in data field ca fixed to 0 bytes bb fixed to 1 byte ia fixed to 1 byte jm value stored in first 2 bytes of data field minus 7 bytes pj fixed to 1 byte ac value stored in first 2 bytes of data field minus 7 bytes da fixed to 5 bytes ea fixed to 0 bytes fa fixed to 4 bytes fc fixed to 0 bytes bd fixed to 1 byte cb fixed to 1 byte ca fixed to 9 bytes bb fixed to 1 byte ia fixed to 1 byte hd value stored in first 2 bytes of data field minus 7 bytes jm fixed to 1 byte pj fixed to 4 bytes ac value stored in first 2 bytes of data field minus 7 bytes da fixed to 1 byte ea fixed to 1 byte fa fixed to 3 bytes fb if previous !fa result code is 0: fixed to 2050 bytes if previous !fa result code is 1: fixed to 1026 bytes fc fixed to 1 byte bd fixed to 2 bytes cb fixed to 10 bytes
data sheet s15671ej4v0ds 50 pd77533 15.1.2 processing of baud rate change command (?set baud rate?) the baud rate change command is processed as follows. (1) a response to the command is created and sent to the ls. (2) the system waits until response transmission is complete. (3) the baud rate is changed in accordance with the command. 15.2 set baud rate this command is used to change the baud rate between the host cpu and the ls. this command must be processed by the host cpu; it is not processed by the pd77533. figure 15-1. set baud rate flow 15.2.1 $bd table 15-3. $bd format (in unpacketed state) section number of bits format description header 8 ? $ command id 16 ? bd data baud rate 8 unsigned see table 15-5 list of baud rates checksum 16 ? checksum end-of-packet 16 ? <0x0d><0x0a> 15.2.2 !bd table 15-4. !bd format (in unpacketed state) section number of bits format description header 8 ? ! command id 16 ? bd data result code 8 unsigned 0 = ok else = error baud rate 8 unsigned see table 15-5 list of baud rates checksum 16 ? checksum end-of-packet 16 ? <0x0d><0x0a> pd77533 host cpu ls !bd $bd
data sheet s15671ej4v0ds 51 pd77533 15.2.3 list of baud rates table 15-5. list of baud rates no. baud rate 0 2400 bps 1 4800 bps 2 9600 bps 3 19200 bps 4 38400 bps 5 57600 bps else 115200 bps remark the baud rate between the pd77533 and the host cpu is changed according to 16.1 baud rate change in 16 local commands . 16. local commands the pd77533 program supports the following local commands. table 16-1. list of local commands command cmd-id function baud rate change 0x01 sets the baud rate between the pd77533 and the host cpu fcc reference frequency 0x02 sets, references the fcc reference frequency power control 0x03 sets a power save mode reset 0x04 resets the pd77533 rf power control 0x05 sets the rf power supply frequency calibration control 0x06 sets, references fcc control txactv control 0x07 sets, references txacvt control sleep timer 0x12 sets, references the sleep timer character timeout 0x13 sets, references the character timeout !cb request 0x20 requests issuance of the !cb response !ia request 0x21 requests issuance of the !ia response snapshot memory check 0x2d checks the snapshot memory status request 0x30 checks the serial communication operation d77533 software version 0x31 references the version of the pd77533 processing status request 0x33 references the status of signal processing rest processing 0x34 references the progress of positioning error status 0x3f sending an error notification ca parameter set 0x40 sets the !ca response parameter cb parameter set 0x41 sets the !cb response parameter doppler search range 0x57 expands the doppler search range
data sheet s15671ej4v0ds 52 pd77533 16.1 baud rate change [function] changes the baud rate between the pd77533 and the host cpu. figure 16-1. baud rate change flow [command] table 16-2. format of baud rate change field number of bytes form description cmd-id 1 ? 0x01 length 1 ? 1 data baud rate 1 unsigned 0 = 2400 bps, 1 = 4800 bps, 2 = 9600 bps ( default ) , 3 = 19200 bps, 4 = 38400 bps, 5 = 57600 bps, else = 115200 bps flag 1 ? 0x03 [response] the pd77533 does not return a response. [remark] if the pd77533 can execute this command correctly, no response is returned. pd77533 host cpu cmd-id = 0x01
data sheet s15671ej4v0ds 53 pd77533 16.2 fcc reference frequency [function] sets and references the fcc reference frequency used for frequency adjustment. figure 16-2. fcc reference frequency flow [command] table 16-3. format of fcc reference frequency field number of bytes form description cmd-id 1 ? 0x02 length 1 ? 4 = sets reference frequency 0 = references current reference frequency data reference frequency (when length = 4) 4 unsigned reference frequency the value to be set must be the frequency multiplied by 1.024. default = 0xe10000 (14.4 mhz x 1.024) flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-3. [related commands] 16.6 frequency calibration control 16.3 power control [function] shifts the pd77533 to a power save mode. figure 16-3. power control flow pd77533 host cpu cmd-id = 0x03 cmd-id = 0x03 shifted to power save mode shifted to run cmd-id = 0x03 pd77533 host cpu cmd-id=0x02 cmd-id=0x02
data sheet s15671ej4v0ds 54 pd77533 [command] table 16-4. format of power control field number of bytes form description cmd-id 1 ? 0x03 length 1 ? 1 data mode 1 unsigned 0 = shifts to run (default) 1 = shifts to halt else = shifts to stop flag 1 ? 0x03 [response] the state to be shifted to is returned in the format shown in table 16-4. [remark] no response is returned when the pd77533 is automatically shifted to a power save mode by the sleep timer. data = 0x00 is returned as the power control response even when restoring the pd77533 from a power save mode. 16.4 reset [function] resets the pd77533. initializes all the settings other than the baud rate. returns a reset response even during a hardware reset when the pd77533 starts. figure 16-4. reset flow [command] table 16-5. format of reset field number of bytes form description cmd-id 1 ? 0x04 length 1 ? 0 flag 1 ? 0x03 pd77533 host cpu cmd-id = 0x04 cmd-id = 0x04 reset (a) when pd77533 starts pd77533 host cpu cmd-id = 0x04 (b) hardware reset
data sheet s15671ej4v0ds 55 pd77533 [response] the state to be shifted to is returned in the format shown in table 16-5. 16.5 rf power control [function] switches the power supply to the rf block on and off. in normal positioning, the logic switches the power supply to the rf block on and off, therefore, control by software is not required. figure 16-5. rf power control flow [command] table 16-6. format of rf power control field number of bytes form description cmd-id 1 ? 0x05 length 1 ? 1 data power supply 1 unsigned 0 = power supply off (default) else = power supply on flag 1 ? 0x03 [response] the value set is returned in the format shown in table 16-6. pd77533 host cpu cmd-id = 0x05 cmd-id = 0x05
data sheet s15671ej4v0ds 56 pd77533 16.6 frequency calibration control [function] sets and references fcc control usage. figure 16-6. frequency calibration control flow [command] table 16-7. format of frequency calibration control field number of bytes form description cmd-id 1 ? 0x06 length 1 ? 1 = sets use of fcc control 0 = references current fcc control usage data fcc control (when length = 1) 1 unsigned 0 = fcc control not used (default) else = fcc control used flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-7. [related commands] 16.2 fcc reference frequency 16.7 txactv control [function] sets and references txactv control usage. figure 16-7. txactv control flow pd77533 host cpu cmd-id = 0x06 cmd-id = 0x06 pd77533 host cpu cmd-id = 0x07 cmd-id = 0x07
data sheet s15671ej4v0ds 57 pd77533 [command] table 16-8. format of txactv control field number of bytes form description cmd-id 1 ? 0x07 length 1 ? 1 = sets use of txactv control 0 = references current txactv control usage data txactv control (when length = 1) 1 unsigned 0 = txactv control not used (default) else = txactv control used flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-8. 16.8 sleep timer [function] sets and references the sleep timer. figure 16-8. sleep timer flow [command] table 16-9. format of sleep timer field number of bytes form description cmd-id 1 ? 0x12 length 1 ? 4 = sets sleep timer 0 = references current sleep timer setting data mode (when length = 4) 1 unsigned 0 = shifts to halt else = shifts to stop time until sleep (when length = 4) 3 unsigned time until the pd77533 is shifted to sleep mode. unit = ms. 0 = not shifted to sleep mode (default) flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-9. pd77533 host cpu cmd-id = 0x12 cmd-id = 0x12
data sheet s15671ej4v0ds 58 pd77533 [remark] the pd77533 is shifted to sleep mode after the specified time has elapsed, without performing positioning, command transmission reception, or other such processing. triggers such as command reception, the wkupb signal, a reset, and a timer interrupt are used to restore the pd77533 from the halt mode. the pd77533 is restored from stop mode to run mode by the wkupb signal, and is totally initialized and restarted by a reset. 16.9 character timeout [function] sets and references the character timeout time. figure 16-9. character timeout flow [command] table 16-10. format of character timeout field number of bytes form description cmd-id 1 ? 0x13 length 1 ? 3 = sets timeout time 0 = references current timeout time data time until timeout (when length = 3) 3 unsigned time until timeout occurs. unit = ms. 0 = timeout not detected (default) flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-10. [remark] if the specified timeout time elapses after the last data of a packet has been received by the pd77533 before packet reception is complete, a timeout occurs. when a timeout occurs, the pd77533 returns the timeout error status and discards the packet data received until that point. pd77533 host cpu cmd-id = 0x13 cmd-id = 0x13
data sheet s15671ej4v0ds 59 pd77533 16.10 !cb request [function] requests the !cb response. figure 16-10. !cb request flow [command] table 16-11. format of !cb request field number of bytes form description cmd-id 1 ? 0x20 length 1 ? 0 flag 1 ? 0x03 [response] a response is returned in the format shown in table 16-11. the pd77533 returns !cb following a response. [remark] this command can be used when positioning is requested from the receiver side. upon receiving the !cb request command, the pd77533 sends the !cb response to the ls. the ls starts positioning after receiving this response. this command does not need to be used when positioning is requested from the ls side. note that the actual control flow when positioning is started from the receiver side depends on the system. pd77533 host cpu ls cmd-id = 0x20 cmd-id = 0x20 !cb ack !cb
data sheet s15671ej4v0ds 60 pd77533 16.11 !ia request [function] requests the !ia response. figure 16-11. !ia request flow [command] table 16-12. format of !ia request field number of bytes form description cmd-id 1 ? 0x21 length 1 ? 0 flag 1 ? 0x03 [response] a response is returned in the format shown in table 16-12. after this response, the !ia response is returned. the !ia result code is 0x09. [remark] how to use this command depends on the system. 16.12 snapshot memory check [function] performs a snapshot memory check. figure 16-12. snapshot memory check flow pd77533 host cpu ls cmd-id = 0x21 cmd-id = 0x21 !ia ack !ia pd77533 host cpu cmd-id = 0x2d cmd-id = 0x2d
data sheet s15671ej4v0ds 61 pd77533 [command] table 16-13. format of snapshot memory check command field number of bytes form description cmd-id 1 ? 0x2d length 1 ? 0 flag 1 ? 0x03 [response] if there is no snapshot memory error, a response is returned in the format shown in table 16-13. if there is an error, the error is returned in the following format. table 16-14. format of snapshot memory check response (when error occurred) field number of bytes form description cmd-id 1 ? 0x2d length 1 ? 7 data address 3 unsigned snapshot memor y address where error occurred (0x0000 to 0xfffff) written value 2 ? value written to snapshot memory read value 2 ? value read from snapshot memory flag 1 ? 0x03 [remark] this command is used to check whether the values 0x0000, 0xaaaa, 0xffff, and 0x5555 written to all snapshot memory areas can be read correctly. 16.13 status request [function] checks the operation of the pd77533. figure 16-13. status request flow [command] table 16-15. format of status request command field number of bytes form description cmd-id 1 ? 0x30 length 1 ? 0 flag 1 ? 0x03 pd77533 host cpu cmd-id = 0x30 cmd-id = 0x30
data sheet s15671ej4v0ds 62 pd77533 [response] a response is returned in the format shown in table 16-15. [remark] the pd77533 simply returns a response to this command; no other processing is performed. 16.14 d77533 software version [function] references the version of the pd77533 software. figure 16-14. d77533 software version flow [command] table 16-16. format of d77533 software version command field number of bytes form description cmd-id 1 ? 0x31 length 1 ? 0 flag 1 ? 0x03 [response] table 16-17. format of d77533 software version response field number of bytes form description cmd-id 1 ? 0x31 length 1 ? 2 data version 1 ? higher 4 bits: digit in the ? 10 ? column lower 4 bits: digit in the ? 1 ? column 1 ? higher 4 bits: digit at the 1st decimal place lower 4 bits: digit at the 2nd decimal place flag 1 ? 0x03 pd77533 host cpu cmd-id = 0x31 cmd-id = 0x31
data sheet s15671ej4v0ds 63 pd77533 16.15 processing status request [function] references the status of pd77533 signal processing. figure 16-15. processing status request flow [command] table 16-18. format of processing status request command field number of bytes form description cmd-id 1 ? 0x33 length 1 ? 0 flag 1 ? 0x03 [response] table 16-19. format of processing status request response field number of bytes form description cmd-id 1 ? 0x33 length 1 ? 1 data status 1 unsigned 0x00 = snapshot under execution 0x10 = signals being processed else = idle flag 1 ? 0x03 16.16 rest processing [function] references the number of satellites remaining to be processed during positioning and the number of times positioning has been performed. figure 16-16. rest processing flow pd77533 host cpu cmd-id = 0x33 cmd-id = 0x33 pd77533 host cpu cmd-id = 0x34 cmd-id = 0x34
data sheet s15671ej4v0ds 64 pd77533 [command] table 16-20. format of rest processing command field number of bytes form description cmd-id 1 ? 0x34 length 1 ? 0 flag 1 ? 0x03 [response] table 16-21. format of rest processing response field number of bytes form description cmd-id 1 ? 0x34 length 1 ? 4 data number of processed satellites 1 unsigned 1 to 32 total number of satellites that should be processed 1 unsigned 1 to 32 current number of times positioning performed 1 unsigned from 0 total number of times positioning to be performed 1 unsigned 0 = no control from 1 = number of times flag 1 ? 0x03 16.17 error status [function] sends notification of an error. [command] table 16-22. format of error status field number of bytes form description cmd-id 1 ? 0x3f length 1 ? 1 data 1 unsigned 0 = ok (ack) 1 = format error 2 = timeout error 4 = undefined cmd-id error else = undefined flag 1 ? 0x03
data sheet s15671ej4v0ds 65 pd77533 16.18 ca parameter set [function] sets and references the !ca parameter. figure 16-17. ca parameter set flow [command] table 16-23. format of ca parameter set field number of bytes form description cmd-id 1 ? 0x40 length 1 ? 8 = sets !ca parameter 0 = references current !ca parameter setting data unit id 1 ? unit id (7:0) (when length = 8) 1 ? unit id (15:8) 1 ? unit id (23:16) 1 ? unit id (31:24) version 1 ? version (7:0) (when length = 8) 1 ? version (15:8) 1 ? version (23:16) 1 ? version (31:24) flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-23. [remark] the unit id and version values depend on the system (customer default). pd77533 host cpu cmd-id = 0x40 cmd-id = 0x40
data sheet s15671ej4v0ds 66 pd77533 16.19 cb parameter set [function] sets and references the !cb parameter. figure 16-18. cb parameter set flow [command] table 16-24. format of cb parameter set field number of bytes form description cmd-id 1 ? 0x41 length 1 ? 10 = sets !cb parameter 0 = references current !cb parameter setting data type 1 ? type (7:0) (when length = 10) 1 ? type (15:8) unit id 1 ? unitid (7:0) (when length = 10) 1 ? unitid (15:8) 1 ? unitid (23:16) 1 ? unitid (31:24) version 1 ? version (7:0) (when length = 10) 1 ? version (15:8) 1 ? version (23:16) 1 ? version (31:24) flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-24. [remark] the type, unit id, and version values depend on the system (customer default). pd77533 host cpu cmd-id = 0x41 cmd-id = 0x41
data sheet s15671ej4v0ds 67 pd77533 16.20 doppler search range [function] sets and references the doppler search range parameter. figure 16-19. doppler search range flow [command] table 16-25. format of doppler search range field number of bytes form description cmd-id 1 ? 0x57 length 1 ? 2 = sets parameter 0 = references current parameter setting data doppler search range 2 ? default doppler search range initial value: 0x0168 flag 1 ? 0x03 [response] the value set or current value is returned in the format shown in table 16-25. [remark] when using a local frequency (gpclk input clock) with an accuracy of 0.1 ppm, the doppler search range parameter value is the initial value. changing the doppler search range parameter to a value other than the initial value is explained in 6.1.3 doppler search range. pd77533 host cpu cmd-id = 0x57 cmd-id = 0x57
data sheet s15671ej4v0ds 68 pd77533 17. extension commands the pd77533 supports the following extension commands. table 17-1. list of extension commands command ext-id function flow point control 0x00 sets and references flow points processing end 0x06 outputs the ?end of all positioning? flow point 17.1 flow point control [function] sets whether a flow point is output or not. ack is not waited for after this command is executed. figure 17-1. flow point control flow [command] table 17-2. format of flow point control command field number of bytes form description cmd-id 1 ? 0x7f length 1 ? 3 data ext-id 1 ? 0x00 flow point 1 ? 0x00: does not output processing end (default) 0x10: outputs processing end 1 ? 0x00 flag 1 ? 0x03 [response] the value set is returned in the format shown in table 17-2. pd77533 host cpu ext-id = 0x00 ext-id = 0x00
data sheet s15671ej4v0ds 69 pd77533 17.2 processing end [function] sends notification of the end of all positioning operations. figure 17-2. processing end flow [command] there are no commands for flow point output. [response] table 17-3. format of processing end command field number of bytes form description cmd-id 1 ? 0x7f length 1 ? 1 data ext-id 1 ? 0x06 flag 1 ? 0x03 pd77533 host cpu ext-id = 0x06 ack
data sheet s15671ej4v0ds 70 pd77533 18. host cpu processing when positioning starts from receiver side in system in which the host cpu and ls are directly connedcted, the host cpu must perform processing using the following procedure when positioning starts after a position trigger is executed from the gps receiver. figure 18-1. host cpu processing procedure when positioning starts from receiver remark see 3.3 processing required at startup for details of the processing performed by the host cpu when the gps receiver is activated. pd77533 host cpu ls !cb !cb request $jm positioning is possible after !ia is returned to the ls via a local command (!ia request). positioning possible $jm !cb !cb is sent to the ls via a local command (!cb request). positioning starts after the ls receives !cb.
data sheet s15671ej4v0ds 71 pd77533 19. electrical specifications absolute maximum ratings parameter symbol conditions rating unit iv dd for core ? 0.5 to +2.6 v supply voltage internal supply voltage av dd for pll analog ? 0.5 to +2.6 v external supply voltage ev dd for i/o pins ? 0.5 to +4.6 v input/output voltage v i /v o ? 0.5 to +4.1, v i < v dd +0.5 v operating ambient temperature t a ? 20 to +85 c storage temperature t stg ? 65 to +150 c caution product quality may suffer if the absolute maximum rating is exceeded even momentarily for any parameter. that is, the absolute maximum ratings are rated values at which the product is on the verge of suffering physical damage, and therefore the product must be used under conditions that ensure that the absolute maximum ratings are not exceeded. recommended operating conditions parameter symbol conditions min. typ. max. unit iv dd for core 1.425 1.5 1.65 v internal voltage av dd for pll analog 1.425 1.5 1.65 v operating voltage external voltage ev dd for i/o pins 2.7 ? 3.6 v input voltage v i 0 ? ev dd v capacitance parameter symbol conditions min. typ. max. unit input capacitance c in f = 1 mhz, unmeasured pins returned to 0 v ?? 10 pf output capacitance c out ?? 10 pf i/o capacitance c i /c o ?? 10 pf
data sheet s15671ej4v0ds 72 pd77533 dc characteristics (t a = ? 20 to +85 c, iv dd , av dd = 1.425 to 1.65 v, ev dd = 2.7 to 3.6 v) parameter symbol conditions min. typ. max. unit input voltage, high v ihn other than schmitt input pins 0.7 ev dd ? ev dd v v ihs schmitt input pins 0.8 ev dd ? ev dd v v ihc clock input pins gpsclk, refclk 0.6 ev dd ? ev dd v input voltage, low v il other than clock input pins 0 ? 0.2 ev dd v v ilc clock input pins gpsclk, refclk 0 ? 0.4 ev dd v output voltage, high v oh i oh = ? 2.0 ma 0.7 ev dd ?? v i oh = ? 100 a 0.8 ev dd ?? output voltage, low v ol i ol = 2.0 ma ?? 0.2 ev dd v input leakage current, high i lh v i = ev dd 0 ? 10 a input leakage current, low i ll v i = ev dd ? 10 ? 0 a pulled-up pin current i pui 0 v < v i < ev dd ? 250 ? 0 a pulled-down pin current i pdi 0 v < v i < ev dd 0 ? 250 a i evdd ? 2 note 1 ? ma i ivdd ? 34 note 1 38 ma normal power supply current i avdd operation mode, t cyc = 12.2 ns, iv dd , av dd = 1.5 v, ev dd = 3.0 v ? 1 note 1 2ma i evddh ??? ma i ivddh ?? power supply current in halt mode i avddh halt mode, t cyc = 12.2 ns, iv dd , av dd = 1.5 v, ev dd = 3.0 v ?? 5 note 2 ma i evdds ?? i ivdds ?? power supply current in stop mode i avdds stop mode, t a = 25 c, iv dd , av dd = 1.5 v, ev dd = 3.0 v ?? 700 note 3 a notes 1. reference value 2. sum of i ivddh and i avddh . 3. sum of i evdds , i ivdds , and i avdds . ac characteristics ? test waveforms 0.8 ev dd 0.5 ev dd 0.2 ev dd 0.8 ev dd 0.5 ev dd 0.2 ev dd measurement points schmitt pins 0.7 ev dd 0.5 ev dd 0.2 ev dd 0.7 ev dd 0.5 ev dd 0.2 ev dd measurement points other than schmitt pins
data sheet s15671ej4v0ds 73 pd77533 clock interface ? clock parameter symbol conditions min. typ. max. unit gps clock input cycle t gcic f = 16.384 mhz 61 ?? ns gps clock high-level width t gtwh t gcic 2 ? 3 ?? ns gps clock low-level width t gtwl t gcic 2 ? 3 ?? ns gps clock rise/fall time t gtrf ?? 5ns ref clock input cycle t rcid pdc reference ? 14.4 ? mhz t rcih phs reference ? 19.2 ? mhz ref clock high-level width t rtwh t rcid /t rcih 2 ? 3 ?? ns ref clock low-level width t rtwl t rcid /t rcih 2 ? 3 ?? ns ref clock rise/fall time t rtrf ?? 5ns ? clock timing gpsclk refclk t gcic t gtwh t gtwl t gtrf t gtrf t rcid, t rcih t rtwh t rtwl t rtrf t rtrf
data sheet s15671ej4v0ds 74 pd77533 system interface ? reset (resetb) parameter symbol conditions min. typ. max. unit resetb low-level width t rwlp on power application note 1 73.2 ?? ns t rwls in stop mode 73.2 ?? ns t rwl in normal mode 73.2 ? ns in halt mode 1170 resetb recovery time t rre in normal mode 73.2 ?? ns in halt mode 1170 output initialization time 1 note 2 (from resetb ) t dr1 ma19 to ma0, mcsb, mrdb, mwrb ?? t gcic + 30 ns output initialization time 2 note 2 (from resetb ) t dr2 md15 to md0 ?? t gcic + 30 ns output initialization time 3 note 2 (from resetb ) t dr3 rts, txd, adsck ?? t gcic + 30 ns output initialization time 4 note 2 (from resetb ) t dr4 agc, dcoff ?? t gcic + 30 ns output initialization time 5 note 2 (from resetb ) t dr5 rfon ?? t gcic + 30 ns notes 1. measurement of ev dd , iv dd , and av dd starts at the point they reach the guaranteed operating voltage after power application. 2. output pin signals are undefined from resetb input to this output initialization time. also, when the pd77533 is restored from the stop mode at power application, measurement starts from the point at which the internal clock starts oscillating stably.
data sheet s15671ej4v0ds 75 pd77533 ? reset timing resetb ma19 to ma0, mcsb,mrdb, mwrb md15 to md0 rts, txd, adsck agc, dcoff rfon t dr1 t dr2 t dr3 t dr4 t dr5 t rre t rwlp , t rwls , t rwl
data sheet s15671ej4v0ds 76 pd77533 wakeup, tx active ? wakeup (wkupb) parameter symbol conditions min. typ. max. unit wkupb setup time (to gpsclk ) t wkps 0 ?? ns wkupb hold time (from gpsclk ) t wkph 15.3 ?? ns wkupb low-level width t wwls in stop mode 73.2 ?? ns t wwl in normal mode 73.2 ? ns in halt mode 1170 ? wkupb recovery time t wre during normal operation 73.2 ?? ns in halt mode 1170 ?? ? tx active parameter symbol conditions min. typ. max. unit txactv setup time (to gpsclk ) t txs 0 ?? ns txactv hold time (from gpsclk ) t txh t gcic ?? ns ? wakeup, tx active timing gpsclk wkupb txactv t wkps t wkps t wkph t wkph t wwls , t wwl t wre t txs t txh t txs t txh
data sheet s15671ej4v0ds 77 pd77533 ? standby parameter symbol conditions min. typ. max. unit stndbyb delay time (from gpsclk ) t sbd ?? 20 ns stndbyb hold time (to gpsclk ) t sbh 0 ?? ns ? standby timing gpsclk stndbyb t sbh t sbd t sbh t sbd
data sheet s15671ej4v0ds 78 pd77533 memory interface ? mobile specified ram parameter symbol conditions min. typ. max. unit access cycle time (ma to ma) t mrdaa 122 ? 1000 ns access cycle time (ma to mcsb ) t mrdac 122 ? 1000 ns access cycle time (mcsb to ma) t mrdca 122 ? 1000 ns access cycle time (mcsb to mcsb ) t mrdcc 122 ? 1000 ns address (ma) delay time t mad ?? 10 ns address (ma) hold time t mas 0 ?? ns address (ma) skew time t masw ?? 10 ns chip select delay time t mcd ?? 10 ns chip select hold time t mch 0 ?? ns chip select recovery time t mcrc 10 ?? ns read strobe (mrdb) delay time t mrd ?? 10 ns read strobe (mrdb) hold time t mrh 0 ?? ns write strobe (mwrb) delay time t mwd t aws is satisfied ?? 10 ns write strobe (mwrb) hold time t mwh 10 ?? ns write strobe (mwrb) width t mww 30 ?? ns address setup time (to mwrb ) t aw s 0 ?? ns read data (md) setup time t rds 20 ?? ns read data (md) hold time t rdh 0 ?? ns write data (md) delay time t wdd ?? 20 ns write data (md) hold time t wdh 0 ?? ns
data sheet s15671ej4v0ds 79 pd77533 ? mobile specified ram interface timing a/d control interface ? ad clock, ad data parameter symbol conditions min. typ. max. unit adsck delay time (from gpsclk )t asd ?? 20 ns adsck hold time (from gpsclk )t ash 0 ?? ns addi setup time (to adsck )t ads 20 ?? ns adsck hold time (from adsck )t adh 5 ?? ns ? ad clock, ad data timing gpsclk ma19 to ma0 mcsb mrdb mwrb md15 to md0 hi-z hi-z hi-z t mrdaa t mad t masw t mas t mrdac t mrdca t mrdcc t mcd t mch t mcrc t mrd t mrh t mwd t aws t mwh t mww t rds t rdh t wdd t wdh gpsclk adsck t ash t asd t ash t asd addi3 to addi0 t adh t ads
data sheet s15671ej4v0ds 80 pd77533 rf control interface ? agc, dcoff, rfon parameter symbol conditions min. typ. max. unit agc delay time (from gpsclk ) t agd ?? 20 ns agc hold time (to gpsclk ) t agh 0 ?? ns dcoff delay time (from gpsclk ) t dcd ?? 20 ns dcoff hold time (to gpsclk ) t dch 0 ?? ns rfon delay time (from gpsclk ) t rfd ?? 50 ns rfon hold time (to gpsclk ) t rfh 0 ?? ns ? agc, dcoff, rfon timing gpsclk agc dcoff rfon t dch t dcd t rfh t rfd t agh t agd t dch t dcd t rfh t rfd t agh t agd
data sheet s15671ej4v0ds 81 pd77533 20. application circuit example rxd rts cts txd refclk txactv resetb wkupb stndbyb invrx mcsb mrdb mwrb ma19 to ma0 md15 to md0 rfon agc dcoff addi3 to addi0 (4 bits of msbs are used.) adsck gpsclk pd77533 host cpu pdc module (10 to 20 mhz) power supply rf block power supply control v cc pd4616112 adc pb1007 rf block note 1575.42 mhz tcxo 16.384 mhz /cs /oe /we a19 to a0 i/o15 to i/o0 4 20 16 mobile specified ram rf/if frequency down converter + pll frequency synthesizer ic v gc (if-mix) ref in 1 2ndif out caution the system gain of the pd77533 is 60.1 db. note the following shows the recommended operation environment for the gps signal input portion (rf block) to the pd77533. parameter value accuracy of input clock to refclk < 0.1 ppm local oscillator stability accuracy of input clock to gpsclk not used resolution of a/d converter 4 bits or more conversion speed of a/d converter 8.192 mhz system nf < 2 db in-band supurious in the band of the center frequency of the last if signal 1 mhz, the total power of supurious should be less ? 20 dbc with reference to the if noise level. average antenna gain ? 6 dbi or more (linear) if the recommended accuracy of the local oscillator stability cannot be obtained, it is possible to use the fcc function via refclk (refer to 6.1 fcc function ). in this case, however, the positioning time and sensitivity may be degraded. an example is shown below (in this example, the positioning time is approximately 30 seconds max., and the sensitivity is hardly degraded at all). accuracy of input clock to refclk: < 0.3 ppm accuracy of input clock to gpsclk: < 10 ppm
data sheet s15671ej4v0ds 82 pd77533 21. package drawing 108-pin plastic fbga (11x11) item millimeters b c d e 10.40 1.10 10.40 p r0.3 c1.0 q 11.00 0.10 25 r w 0.20 0.08 m j 1.51 0.15 a 11.00 0.10 f 0.8 (t.p.) g 0.35 0.1 h 0.36 i 1.16 k 0.10 l 0.50 + 0.05 ? 0.10 s108s1-80-yhc-1 y1 0.20 a b c d e f g h j k l m 12 11 10 9 8 7 6 5 4 3 2 1 s a b q p index mark b s a s a b w cd w r h j i g e f l s sab s m k m y1
data sheet s15671ej4v0ds 83 pd77533 22. recommended soldering conditions this product should be soldered and mounted under the following recommended conditions. for details of the recommended soldering conditions, refer to the document semiconductor device mounting technology manual (c10535e) . for soldering methods and conditions other than those recommended below, contact an nec sales representative. pd77533s1-yhc: 108-pin plastic bga (fine pitch) (11 11) soldering method soldering conditions recommended condition symbol infrared reflow package peak temperature: 260 c, time: 60 seconds max. (at 220 c or higher), count: twice or less, exposure limit: 3 days note (after that, prebake at 125 c for 10 to 72 hours) ir30-103-2 note after opening the dry pack, store it at 25 c or less and 65% rh or less for the allowable storage period.
data sheet s15671ej4v0ds 84 pd77533 appendix sample program the following program is a sample provided to enable an understanding of what is processed by the host cpu. the actual operation of the program differs depending on the system. /*============================================================================= * * host cpu sample program * =============================================================================== * copyright(c) 2001 nec corporation. =============================================================================== * this program describes an example of processing that should be performed by the host cpu. * to actually operate the program, it must be revised to comply with the system. =============================================================================*/ /*=====================*/ /* constant definition */ /*=====================*/ /* bool value */ #define true 1 /* true */ #define false 0 /* false */ /* state values used by state machine */ #define state_init 0 /* initialization */ #define state_wait_reset 1 /* reset response wait */ #define state_send_timeout 2 /* character timeout command transmission */ #define state_wait_timeout 3 /* character timeout response wait */ #define state_send_fcc_freq 4 /* fcc frequency command transmission */ #define state_wait_fcc_freq 5 /* fcc frequency response wait */ #define state_send_txacvt 6 /* txacvt command transmission */ #define state_wait_txacvt 7 /* txacvt response wait */ #define state_send_fcc_ctrl 8 /* fcc control command transmission */ #define state_wait_fcc_ctrl 9 /* fcc control response wait */ #define state_send_flow_ctrl 10 /* flow point control command transmission */ #define state_wait_flow_ctrl 11 /* flow point control response wait */ #define state_init_done 12 /* initialization complete */ #define state_done 13 /* complete */ /* serial buffer control value */ #define serial_gm 0 /* gm size of serial line */ #define serial_ls 1 /* ls size of serial line */ #define serial_in 0 /* serial input */ #define serial_out 1 /* serial output */ /* packet */ #define packet_data_len 255 /* maximum length of data segment of packet */ #define packet_info_len 3 /* length of information segment of packet */ #define packet_max_len (packet_data_len+packet_info_len) /* maximum length of packet */ #define packet_flg 0x03 /* flg (not continued) */ #define packet_flg_cont 0x02 /* flg (continued) */ /* buffer size */ #define maxblock packet_max_len /* block size of serial reception */
data sheet s15671ej4v0ds 85 pd77533 /* ls command */ #define cmd_ca 0x4341 /* "ca" */ #define cmd_bb 0x4242 /* "bb" */ #define cmd_ia 0x4941 /* "ia" */ #define cmd_jm 0x4a4d /* "jm" */ #define cmd_pj 0x504a /* "pj" */ #define cmd_ac 0x4143 /* "ac" */ #define cmd_da 0x4441 /* "da" */ #define cmd_ea 0x4541 /* "ea" */ #define cmd_fa 0x4641 /* "fa" */ #define cmd_fc 0x4643 /* "fc" */ #define cmd_bd 0x4244 /* "bd" */ #define cmd_cb 0x4342 /* "cb" */ #define cmd_id_ls 0x80 /* ls command */ #define cmd_id_extention 0x7f /* extension command */ #define ls_cmd_max_len 330 /* maximum length of ls command */ /*====================*/ /* structure definition */ /*====================*/ /* com information */ /* serial transmission/reception data is stored in com information work area */ typedef struct { unsigned char bindata[2][packet_max_len]; /* transmitted/received data (binary) */ int currentlen[2]; /* length of data stored in bindata */ int estimatelen[2]; /* estimated total length of packet */ int fixedflag[2]; /* packet complete flag */ /* the above packet complete flag becomes true when the whole */ /* packet has been received in serial_in, and in serial_out, */ /* transmission is started immediately after the flag is set to true. */ int acknackwait; /* ack/nack wait flag */ int lscmdlen; /* length of command from ls */ } comminfo; /* response information */ /* response from gs and commands from ls are stored in response */ /* information work area when received */ typedef struct { /* gm side */ unsigned int gmrescnt; /* response count on gm side */ int gmresfixed; /* response reception complete flag on gm side */ int gmreslen; /* length of response on gm side */ unsigned char gmresdata[packet_max_len]; /* response data on gm side */ /* ls side */ unsigned int lsrescnt; /* response count on ls side */ int lsresfixed; /* response reception complete flag on ls side */ int lsreslen; /* length of response on ls side */ unsigned char lsresdata[ls_cmd_max_len]; /* response data on ls side */ } resinfo; /*==================*/ /* function prototype */ /*==================*/ static int comparedata(const unsigned char *data1, int len1, const unsigned char *data2, int len2);
data sheet s15671ej4v0ds 86 pd77533 static int recvdatafromgm(unsigned char *buf); static int recvdatafromls(unsigned char *buf); static void senddatatogm(const unsigned char *data, int len); static void senddatatols(const unsigned char *data, int len); static void hostcputhreadloop(void); static void gmserialin(void); static void copygmres(void); static void checkgmres(void); static void discardlastpacket(void); static void resendlastpacket(void); static void sendlsack(void); static void sendlocalack(void); static void sendnack(void); static void copygmtols(void); static void gmserialout(void); static void lsserialin(void); static void copylsres(void); static void copylstogm(void); static int getlscmdlen(unsigned char *data); static void lsserialout(void); /*======================*/ /* static work area */ /*======================*/ static comminfo gmcomm; /* com information on gm side */ static comminfo lscomm; /* com information on ls side */ static resinfo resinfo; /* response information */ /* data string of gm command */ /* ack (ls command) */ static const unsigned char serverack[] = { cmd_id_ls, 0x00, packet_flg }; /* ack (local command) */ static const unsigned char localack[] = { 0x3f, 0x01, 0x00, packet_flg }; /* nack */ static const unsigned char bothnack[] = { 0x3f, 0x01 }; /* nack (error) */ static const unsigned char errornack[] = { 0x3f, 0x01, 0x01, packet_flg }; /* reset response */ static const unsigned char resetrsp[] = { 0x04, 0x00, packet_flg }; /* character timeout command/response */ static const unsigned char timeoutcmdrsp[] = { 0x13, 0x03, 0xe8, 0x03, 0x00, packet_flg }; /* fcc frequency command/response */ static const unsigned char fccfreqcmdrsp[] = { 0x02, 0x04, 0x00, 0x00, 0xe1, 0x00, packet_flg }; /* txacvt command/response */ static const unsigned char txacvtcmdrsp[] = { 0x07, 0x01, 0x01, packet_flg }; /* fcc control command/response */ static const unsigned char fccctrlcmdrsp[] = { 0x06, 0x01, 0x01, packet_flg }; /* flow point control command/response */ static const unsigned char flowpointctrlcmdrsp[] = { 0x7f, 0x03, 0x00, 0x10, 0x00, packet_flg }; /*----------------------------------------------------------------------------- * function * main program * * parameter * none *
data sheet s15671ej4v0ds 87 pd77533 * return value * none ---------------------------------------------------------------------------- */ int main(void) { int state; unsigned char buf[ls_cmd_max_len]; int len; /* state machine */ /* state machine to perform a series of processing: initialization ? reset wait ? default settings */ state = state_init; while(state != state_done) { switch(state) { /******************/ /* initialization state */ /******************/ case state_init : /* initialize internal work */ gmcomm.currentlen[serial_out] = 0; gmcomm.currentlen[serial_in] = 0; gmcomm.estimatelen[serial_out] = 0; gmcomm.estimatelen[serial_in] = 0; gmcomm.fixedflag[serial_out] = false; gmcomm.fixedflag[serial_in] = false; gmcomm.acknackwait = false; gmcomm.lscmdlen = 0; lscomm.currentlen[serial_out] = 0; lscomm.currentlen[serial_in] = 0; lscomm.estimatelen[serial_out] = 0; lscomm.estimatelen[serial_in] = 0; lscomm.fixedflag[serial_out] = false; lscomm.fixedflag[serial_in] = false; lscomm.acknackwait = false; lscomm.lscmdlen = 0; resinfo.gmrescnt = 0; resinfo.gmresfixed = false; resinfo.gmreslen = 0; resinfo.lsrescnt = 0; resinfo.lsresfixed = false; resinfo.lsreslen = 0; /* open serial communication on gm and ls sides */ openserial(serial_gm); openserial(serial_ls); /* start host cpu processing thread */ createthread(hostcputhreadloop); state = state_wait_reset; break; /*******************************/ /* reset response wait state */ /*******************************/ /* wait for reset response and proceed to next processing when received */ case state_wait_reset :
data sheet s15671ej4v0ds 88 pd77533 len = recvdatafromgm(buf); if(comparedata(buf, len, resetrsp, sizeof(resetrsp)) == 0) state = state_send_timeout; break; /*******************************************/ /* character timeout transmission state */ /*******************************************/ /* send character timeout command to gm (timeout set to 1 second) */ case state_send_timeout : senddatatogm(timeoutcmdrsp, sizeof(timeoutcmdrsp)); state = state_wait_timeout; break; /* wait for character timeout response */ /* wait for character timeout response and proceed to next processing when received */ case state_wait_timeout : len = recvdatafromgm(buf); if(comparedata(buf, len, timeoutcmdrsp, sizeof(timeoutcmdrsp)) == 0) state = state_send_fcc_freq; break; /***************************************/ /* fcc frequency command transmission state */ /***************************************/ /* send fcc frequency command to gm (frequency set to 14.4 mhz ) */ case state_send_fcc_freq : senddatatogm(fccfreqcmdrsp, sizeof(fccfreqcmdrsp)); state = state_wait_fcc_freq; break; /* wait for fcc frequency response */ /* wait for fcc frequency and proceed to next processing when received */ case state_wait_fcc_freq : len = recvdatafromgm(buf); if(comparedata(buf, len, fccfreqcmdrsp, sizeof(fccfreqcmdrsp)) == 0) state = state_send_txacvt; break; /********************************/ /* txacvt command transmission state */ /********************************/ /* send txacvt command to gm (txacvt control set to on) */ case state_send_txacvt : senddatatogm(txacvtcmdrsp, sizeof(txacvtcmdrsp)); state = state_wait_txacvt; break; /* wait for txacvt response */ /* wait for txacvt response and proceed to next processing when received */ case state_wait_txacvt : len = recvdatafromgm(buf); if(comparedata(buf, len, txacvtcmdrsp, sizeof(txacvtcmdrsp)) == 0) state = state_send_fcc_ctrl; break; /*************************************/ /* fcc control command transmission state */ /*************************************/ /* send fcc control command to gm (fcc control set to on) */ case state_send_fcc_ctrl :
data sheet s15671ej4v0ds 89 pd77533 senddatatogm(fccctrlcmdrsp, sizeof(fccctrlcmdrsp)); state = state_wait_fcc_ctrl; break; /* wait for fcc control response */ /* wait for fcc control response and proceed to next processing when received. */ case state_wait_fcc_ctrl : len = recvdatafromgm(buf); if(comparedata(buf, len, fccctrlcmdrsp, sizeof(fccctrlcmdrsp)) == 0) state = state_send_flow_ctrl; break; /********************************************/ /* flow point control command transmission state */ /********************************************/ /* send flow point control command to gm (processing end output set to on) */ case state_send_flow_ctrl : senddatatogm(flowpointctrlcmdrsp, sizeof(flowpointctrlcmdrsp)); state = state_wait_flow_ctrl; break; /* wait for flow point control response */ /* wait for flow point control response and proceed to next processing when received. */ case state_wait_flow_ctrl : len = recvdatafromgm(buf); if(comparedata(buf, len, flowpointctrlcmdrsp, sizeof(flowpointctrlcmdrsp)) == 0) state = state_init_done; break; /****************************************************/ /* gm initialization complete. start processing such as positioning. */ /****************************************************/ case state_init_done : /* perform processing after initialization, if required. */ break; } } return(0); } /*----------------------------------------------------------------------------- * function * compare data * * parameter * const unsigned char *data1: data 1 * int len1: number of bytes of data 1 * const unsigned char *data2: data 2 * int len2: number of bytes of data 2 * * return value * int: result (0 = match) ---------------------------------------------------------------------------- */ static int comparedata(const unsigned char *data1, int len1, const unsigned char *data2, int len2) { int sts; sts = len1 - len2; if(sts == 0) sts = memcmp(data1, data2, len1);
data sheet s15671ej4v0ds 90 pd77533 return(sts); } /*----------------------------------------------------------------------------- * function * receive data from gm * * parameter * unsigned char *buf: buffer that receives data * * return value * int: number of bytes of data (0 = no data) ---------------------------------------------------------------------------- */ static int recvdatafromgm(unsigned char *buf) { int len; len = 0; if(resinfo.gmresfixed) /* if there is a response */ { /* copy to buffer */ memcpy(buf, resinfo.gmresdata, resinfo.gmreslen); len = resinfo.gmreslen; resinfo.gmresfixed = false; } return(len); } /*----------------------------------------------------------------------------- * function * receive data from ls * * parameter * unsigned char *buf: buffer that receives data * * return value * int: number of bytes of data (0 = no data) ---------------------------------------------------------------------------- */ static int recvdatafromls(unsigned char *buf) { int len; len = 0; if(resinfo.lsresfixed) /* if there is a response */ { /* copy to buffer */ memcpy(buf, resinfo.lsresdata, resinfo.lsreslen); len = resinfo.lsreslen; resinfo.lsresfixed = false; } return(len); } /*----------------------------------------------------------------------------- * function * transmit data to gm * * parameter
data sheet s15671ej4v0ds 91 pd77533 * unsigned char *data: data to be transmitted * int len: number of bytes of data * * return value * none ---------------------------------------------------------------------------- */ static void senddatatogm(const unsigned char *data, int len) { /* copy data to be transmitted to com information */ memcpy(gmcomm.bindata[serial_out], data, len); gmcomm.currentlen[serial_out] = len; gmcomm.fixedflag[serial_out] = true; /* this flag starts transmission */ return; } /*----------------------------------------------------------------------------- * function * transmit data to ls * * parameter * unsigned char *data: data to be transmitted * int len: number of bytes of data * * return value * none ---------------------------------------------------------------------------- */ static void senddatatols(const unsigned char *data, int len) { /* copy data to be transmitted to com information */ memcpy(lscomm.bindata[serial_out], data, len); lscomm.currentlen[serial_out] = len; lscomm.fixedflag[serial_out] = true; /* this flag starts transmission */ return; } /*----------------------------------------------------------------------------- * function * thread of host cpu processor * * parameter * none * * return value * none * * note * this thread is separately processed to prevent it from being * affected by other main program processing. ---------------------------------------------------------------------------- */ static void hostcputhreadloop(void) { for(;;) { /* receive data from gm and store it in gmcomm */ gmserialin(); /* in a state other than waiting for ack/nack from gm, */ /* receive data from ls and store it in lscomm. */ if(gmcomm.acknackwait == false)
data sheet s15671ej4v0ds 92 pd77533 lsserialin(); /* transmit transmission data stored in gmcomm. */ gmserialout(); /* transmit transmission data stored in lscomm. */ lsserialout(); } } /*----------------------------------------------------------------------------- * function * input by dsp * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void gmserialin(void) { int len; unsigned char buf[maxblock]; int i; /* read response from gm */ if((len = recvfromserial(serial_gm, (char*)buf, maxblock)) > 0) { /* analyze contents of response */ for(i = 0; i < len; i++) { gmcomm.bindata[serial_in][gmcomm.currentlen[serial_in]] = buf[i]; gmcomm.currentlen[serial_in] += 1; if(gmcomm.currentlen[serial_in] == 1) /* 1st byte? */ { /* cmd-id has been read */ gmcomm.estimatelen[serial_in] = -1; } else if(gmcomm.currentlen[serial_in] == 2) /* 2nd byte? */ { /* length has been read */ gmcomm.estimatelen[serial_in] = buf[i]+packet_info_len; } else { if(gmcomm.currentlen[serial_in] == gmcomm.estimatelen[serial_in]) { /* whole packet has been read */ gmcomm.fixedflag[serial_in] = true; /* check response from gm */ copygmres(); checkgmres(); gmcomm.fixedflag[serial_in] = false; gmcomm.currentlen[serial_in] = 0; } }
data sheet s15671ej4v0ds 93 pd77533 } } return; } /*----------------------------------------------------------------------------- * function * copy response from gm to response information * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void copygmres(void) { resinfo.gmrescnt += 1; resinfo.gmreslen = gmcomm.currentlen[serial_in]; memcpy(resinfo.gmresdata, gmcomm.bindata[serial_in], resinfo.gmreslen); resinfo.gmresfixed = true; return; } /*----------------------------------------------------------------------------- * function * check response from gm * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void checkgmres(void) { unsigned char flag; int len; len = gmcomm.currentlen[serial_in]; flag = gmcomm.bindata[serial_in][len-1]; if((flag == packet_flg) || (flag == packet_flg_cont)) { if(((len == 3) && (memcmp(gmcomm.bindata[serial_in], serverack, sizeof(serverack)) == 0)) || ((len == 4) && (memcmp(gmcomm.bindata[serial_in], localack, sizeof(localack)) == 0))) { /* response is ack */ if(gmcomm.acknackwait) discardlastpacket(); #if 0 else unnecessary ack is received from gm when ack/nack is not being waited for #endif } else if((len == 4) && (memcmp(gmcomm.bindata[serial_in], bothnack, sizeof(bothnack)) == 0)) { /* response is nack */ if(gmcomm.acknackwait) resendlastpacket();
data sheet s15671ej4v0ds 94 pd77533 } else if(gmcomm.bindata[serial_in][0] == cmd_id_ls) { /* response in ls command */ sendlsack(); copygmtols(); } else if((gmcomm.bindata[serial_in][0] == cmd_id_extention) && (gmcomm.bindata[serial_in][2] != 0x00)) { /* response is flow point setting */ sendlocalack(); } else { /* response is local command */ /* add items to be processed, if any */ } } else { /* flag incorrect */ /* transmit nack for server command packets to request re-sending */ if(gmcomm.bindata[serial_in][0] == cmd_id_ls) sendnack(); } return; } /*----------------------------------------------------------------------------- * function * discard packet transmitted last * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void discardlastpacket(void) { gmcomm.acknackwait = false; gmcomm.currentlen[serial_out] = 0; return; } /*----------------------------------------------------------------------------- * function * re-send packet transmitted last * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void resendlastpacket(void) {
data sheet s15671ej4v0ds 95 pd77533 gmcomm.fixedflag[serial_out] = true; gmcomm.acknackwait = false; gmserialout(); } /*----------------------------------------------------------------------------- * function * transmitted a server command, ack(80 00 03) * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void sendlsack(void) { memcpy(gmcomm.bindata[serial_out], serverack, sizeof(serverack)); gmcomm.currentlen[serial_out] = sizeof(serverack); gmcomm.fixedflag[serial_out] = true; gmserialout(); } /*----------------------------------------------------------------------------- * function * transmitted a local command, ack(3f 01 00 03) * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void sendlocalack(void) { memcpy(gmcomm.bindata[serial_out], localack, sizeof(localack)); gmcomm.currentlen[serial_out] = sizeof(localack); gmcomm.fixedflag[serial_out] = true; gmserialout(); } /*----------------------------------------------------------------------------- * function * transmit nack * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void sendnack(void) { memcpy(gmcomm.bindata[serial_out], errornack, sizeof(errornack)); gmcomm.currentlen[serial_out] = sizeof(errornack); gmcomm.fixedflag[serial_out] = true; gmserialout(); }
data sheet s15671ej4v0ds 96 pd77533 /*----------------------------------------------------------------------------- * function * transmit response from gm to ls * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void copygmtols(void) { int len; /* transmit only contents of packet to ls */ len = gmcomm.currentlen[serial_in] - packet_info_len; memcpy(lscomm.bindata[serial_out], gmcomm.bindata[serial_in] + 2, len); lscomm.currentlen[serial_out] = len; lscomm.fixedflag[serial_out] = true; lsserialout(); return; } /*----------------------------------------------------------------------------- * function * output to gm * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void gmserialout(void) { if(gmcomm.fixedflag[serial_out]) { /* output to gm */ sendtoserial(serial_gm, (char*)gmcomm.bindata[serial_out], gmcomm.currentlen[serial_out]); gmcomm.fixedflag[serial_out] = false; /* for ls command, set so that ack/nack is waited for */ if((gmcomm.bindata[serial_out][0] == cmd_id_ls) && ((gmcomm.currentlen[serial_out] != 3) || (memcmp(gmcomm.bindata[serial_out], serverack, sizeof(serverack)) != 0))) { gmcomm.acknackwait = true; } else gmcomm.currentlen[serial_out] = 0; } return; } /*----------------------------------------------------------------------------- * function * input by ls
data sheet s15671ej4v0ds 97 pd77533 * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void lsserialin(void) { int len; if(lscomm.estimatelen[serial_in] > 0) { /* data previously read remains unused. when multiple commands */ /* (that need to be divided into multiple packets) are continuously transmitted */ /* from ls, the first command is immediately used, however, the second and later */ /* commands stay in packets and are transmitted here. */ copylstogm(); if(lscomm.currentlen[serial_in] == lscomm.estimatelen[serial_in]) lscomm.estimatelen[serial_in] = 0; } else if((len = recvfromserial(serial_ls, (char*)lscomm.bindata[serial_in], packet_data_len)) > 0) { lscomm.currentlen[serial_in] = len; lscomm.estimatelen[serial_in] = 0; copylstogm(); if(lscomm.currentlen[serial_in] == lscomm.estimatelen[serial_in]) lscomm.estimatelen[serial_in] = 0; } return; } /*----------------------------------------------------------------------------- * function * copy command from ls to response buffer * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void copylsres(void) { resinfo.lsrescnt += 1; resinfo.lsreslen = lscomm.currentlen[serial_in]; memcpy(resinfo.lsresdata, lscomm.bindata[serial_in], resinfo.lsreslen); resinfo.lsresfixed = true; return; } /*----------------------------------------------------------------------------- * function * output command from ls to gm * * parameter
data sheet s15671ej4v0ds 98 pd77533 * none * * return value * none ---------------------------------------------------------------------------- */ static void copylstogm(void) { int i; unsigned char data; static unsigned char lscmddata[5]; for(i = lscomm.estimatelen[serial_in]; i < lscomm.currentlen[serial_in]; i++) { data = lscomm.bindata[serial_in][i]; if(gmcomm.currentlen[serial_out] == 0) { /* first data */ /* put into packet */ gmcomm.bindata[serial_out][0] = cmd_id_ls; /* cmd-id = 0x80, set length later */ gmcomm.bindata[serial_out][2] = data; gmcomm.currentlen[serial_out] = packet_info_len; } else { /* set data */ gmcomm.bindata[serial_out][gmcomm.currentlen[serial_out]] = data; gmcomm.currentlen[serial_out] += 1; } if(lscomm.lscmdlen < 5) lscmddata[lscomm.lscmdlen] = data; lscomm.lscmdlen += 1; if(lscomm.lscmdlen == 5) { lscomm.estimatelen[serial_out] = getlscmdlen(lscmddata); if(lscomm.estimatelen[serial_out] == 0) gmcomm.currentlen[serial_out] = 0; } if(lscomm.lscmdlen == lscomm.estimatelen[serial_out]) { /* last packet */ /* transmit with flag = 0x03 */ gmcomm.bindata[serial_out][gmcomm.currentlen[serial_out]] = packet_flg; gmcomm.currentlen[serial_out] += 1; gmcomm.bindata[serial_out][1] = gmcomm.currentlen[serial_out] - packet_info_len; gmcomm.fixedflag[serial_out] = true; copylsres(); lscomm.lscmdlen = 0; lscomm.estimatelen[serial_out] = 0; i++; break; } } if(gmcomm.fixedflag[serial_out] == false) { /* intermediate packet */
data sheet s15671ej4v0ds 99 pd77533 /* transmit with flag = 0x02 */ gmcomm.bindata[serial_out][gmcomm.currentlen[serial_out]] = packet_flg_cont; gmcomm.currentlen[serial_out] += 1; gmcomm.bindata[serial_out][1] = gmcomm.currentlen[serial_out] - packet_info_len; gmcomm.fixedflag[serial_out] = true; } gmserialout(); lscomm.estimatelen[serial_in] = i; return; } /*----------------------------------------------------------------------------- * function * find expected value of ls command length * * parameter * unsigned char *data: data string of ls command * * return value * int: number of bytes ---------------------------------------------------------------------------- */ static int getlscmdlen(unsigned char *data) { short cmd; int len; len = 0; cmd = (*(data + 1) << 8) | *(data + 2); switch(cmd) { case cmd_ca : case cmd_ea : case cmd_fc : len = 0 + 7; /* data field is fixed to 0 bytes */ break; case cmd_bb : case cmd_ia : case cmd_pj : case cmd_bd : case cmd_cb : len = 1 + 7; /* data field is fixed to 1 byte */ break; case cmd_fa : len = 4 + 7; /* data field is fixed to 4 bytes */ break; case cmd_da : len = 5 + 7; /* data field is fixed to 5 bytes */ break; case cmd_jm : case cmd_ac : len = (*(data + 4) << 8) | *(data + 3); break; } return(len);
data sheet s15671ej4v0ds 100 pd77533 } /*----------------------------------------------------------------------------- * function * output to ls * * parameter * none * * return value * none ---------------------------------------------------------------------------- */ static void lsserialout(void) { if(lscomm.fixedflag[serial_out]) { sendtoserial(serial_ls, (char*)lscomm.bindata[serial_out], lscomm.currentlen[serial_out]); lscomm.fixedflag[serial_out] = false; } return; }
data sheet s15671ej4v0ds 101 pd77533 notes for cmos devices 1 precaution against esd for semiconductors note: strong electric field, when exposed to a mos device, can cause destruction of the gate oxide and ultimately degrade the device operation. steps must be taken to stop generation of static electricity as much as possible, and quickly dissipate it once, when it has occurred. environmental control must be adequate. when it is dry, humidifier should be used. it is recommended to avoid using insulators that easily build static electricity. semiconductor devices must be stored and transported in an anti-static container, static shielding bag or conductive material. all test and measurement tools including work bench and floor should be grounded. the operator should be grounded using wrist strap. semiconductor devices must not be touched with bare hands. similar precautions need to be taken for pw boards with semiconductor devices on it. 2 handling of unused input pins for cmos note: no connection for cmos device inputs can be cause of malfunction. if no connection is provided to the input pins, it is possible that an internal input level may be generated due to noise, etc., hence causing malfunction. cmos devices behave differently than bipolar or nmos devices. input levels of cmos devices must be fixed high or low by using a pull-up or pull-down circuitry. each unused pin should be connected to v dd or gnd with a resistor, if it is considered to have a possibility of being an output pin. all handling related to the unused pins must be judged device by device and related specifications governing the devices. 3 status before initialization of mos devices note: power-on does not necessarily define initial status of mos device. production process of mos does not define the initial operation status of the device. immediately after the power source is turned on, the devices with reset function have not yet been initialized. hence, power-on does not guarantee out-pin levels, i/o settings or contents of registers. device is not initialized until the reset signal is received. reset operation must be executed immediately after power-on for devices having reset function.
pd77533 m8e 00. 4 the information in this document is current as of may, 2002. the information is subject to change without notice. for actual design-in, refer to the latest publications of nec's data sheets or data books, etc., for the most up-to-date specifications of nec semiconductor products. not all products and/or types are available in every country. please check with an nec sales representative for availability and additional information. no part of this document may be copied or reproduced in any form or by any means without prior written consent of nec. nec assumes no responsibility for any errors that may appear in this document. nec does not assume any liability for infringement of patents, copyrights or other intellectual property rights of third parties by or arising from the use of nec semiconductor products listed in this document or any other liability arising from the use of such products. no license, express, implied or otherwise, is granted under any patents, copyrights or other intellectual property rights of nec or others. descriptions of circuits, software and other related information in this document are provided for illustrative purposes in semiconductor product operation and application examples. the incorporation of these circuits, software and information in the design of customer's equipment shall be done under the full responsibility of customer. nec assumes no responsibility for any losses incurred by customers or third parties arising from the use of these circuits, software and information. while nec endeavours to enhance the quality, reliability and safety of nec semiconductor products, customers agree and acknowledge that the possibility of defects thereof cannot be eliminated entirely. to minimize risks of damage to property or injury (including death) to persons arising from defects in nec semiconductor products, customers must incorporate sufficient safety measures in their design, such as redundancy, fire-containment, and anti-failure features. nec semiconductor products are classified into the following three quality grades: "standard", "special" and "specific". the "specific" quality grade applies only to semiconductor products developed based on a customer-designated "quality assurance program" for a specific application. the recommended applications of a semiconductor product depend on its quality grade, as indicated below. customers must check the quality grade of each semiconductor product before using it in a particular application. "standard": computers, office equipment, communications equipment, test and measurement equipment, audio and visual equipment, home electronic appliances, machine tools, personal electronic equipment and industrial robots "special": transportation equipment (automobiles, trains, ships, etc.), traffic control systems, anti-disaster systems, anti-crime systems, safety equipment and medical equipment (not specifically designed for life support) "specific": aircraft, aerospace equipment, submersible repeaters, nuclear reactor control systems, life support systems and medical equipment for life support, etc. the quality grade of nec semiconductor products is "standard" unless otherwise expressly specified in nec's data sheets or data books, etc. if customers wish to use nec semiconductor products in applications not intended by nec, they must contact an nec sales representative in advance to determine nec's willingness to support a given application. (note) (1) "nec" as used in this statement means nec corporation and also includes its majority-owned subsidiaries. (2) "nec semiconductor products" means any semiconductor product developed or manufactured by or for nec (as defined above). ? ? ? ? ? ?


▲Up To Search▲   

 
Price & Availability of UPD77533S1-YHC

All Rights Reserved © IC-ON-LINE 2003 - 2022  

[Add Bookmark] [Contact Us] [Link exchange] [Privacy policy]
Mirror Sites :  [www.datasheet.hk]   [www.maxim4u.com]  [www.ic-on-line.cn] [www.ic-on-line.com] [www.ic-on-line.net] [www.alldatasheet.com.cn] [www.gdcy.com]  [www.gdcy.net]


 . . . . .
  We use cookies to deliver the best possible web experience and assist with our advertising efforts. By continuing to use this site, you consent to the use of cookies. For more information on cookies, please take a look at our Privacy Policy. X